Because a lot of work is done with URIs, proper encapsulation is
necessary. By using an OO approach, we have greater flexibility, ease of
use, clarity and power - as apposed to dealing with string manipulation
all the time.
Change-Id: I3db0712aeadd65f70a599d11b4bc257ad464d0d0
Previously, all work submitted by Rackspace employees were done with
"Copyright OpenStack Foundation" headers. This was done because we were
uncertain about the correct legal solution; since then, we have been
instructed to label all our work with "Rackspace US, Inc." copyrights
instead. This commit does that and reformats the docblock to a more
consistent style. Other PHP projects like Symfony, Composer, Doctrine,
etc. all do this.
Change-Id: I3e03b624d889a7a687ce630feef918ef9a24d015
Currently we have a stand-alone script that tests authentication using
CLI commands. This does not integrate with our test suite. We already have
phpunit test files which test authentication, so we should be consistent with our approach.
Change-Id: I8779aa75a269f25a704652d752c6f58c5dc62176
The `guzzlehttp/guzzle' package will automatically pull in the streams
dependency by itself, so we do not need to list it as an additional
dependency. Also switching to tilde operators since it makes it clear that we're
following semantic versioning.
Change-Id: I8b45184242fc538ea2d92275d9e0e4137e744f70
This patch achieves three interrelated changes
1. an update to the ClientInterface, making it more efficient and
consistent with other HTTP libraries. PSR-FIG messages have also been
added as separate classes, rather than lumped as one. Guzzle
functionality has also been moved to its own namespace;
2. the refactoring of `GuzzleClient` to `GuzzleAdapter`, including
relevant changes needed for the interface change (1). We now have
ADAPTERS that bridge our interfaces with Guzzle's - making that
difference much clearer, extensible, less tightly coupled and less
brittle;
3. moving "bad request" error handling into its own dedicated space,
based on how the new Adapter functionality (2). Previously the client
tried to do all the exception logic - but this is not strictly its
responsibility. This logic has been shipped out to a base
RequestException which instantiates one of its children exception based
on the HTTP status code.
Although I have attempted to keep the scope of this patch to a minimum,
as granular as possible, because the interface is a core internal API,
various other files need to be modified to reflect the change. In terms
of the other two changes, these are inextricably linked to the interface
change, so cannot be teased out into their own patches.
Change-Id: Ibc1b50cec125c11d32ee6e4f0dbb395fcaea864e
multiple API verstions for each service. This included
updating the directory structure for the tests and moving
the Common files to a Common namespace.
Implements blueprint multiple-api-versions
Change-Id: I9f9dfc4ef8f4172243519772a9af86dd92690fcf
messages and to use Guzzle 4 as the default transport layer.
implements blueprint guzzle-transport
Closes-Bug: 1277535
Change-Id: I287587b75f42bb48e945335a7b734cadaedc684f