1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 18:13:00 +01:00

1169 Commits

Author SHA1 Message Date
Michael Dowling
76ac09bc5a Making it easier to add event subscribers 2012-06-02 22:42:21 -07:00
Michael Dowling
0d59a479bb Fixing brittle test. Removing debug stuff from travis 2012-06-02 21:56:23 -07:00
Michael Dowling
1136c66774 [Http] BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() 2012-06-02 21:49:42 -07:00
Michael Dowling
614e4d1666 [Http] Refactoring cookie implementation
* Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie
data
* Moving almost all cookie logic out of the CookiePlugin and into the
Cookie or CookieJar implementations
* Array cookie jar now returns matching cookies for a request and adds
cookies from responses
* Renaming methods in the CookieJarInterface
* Removing old references to deleted classes
* Guzzle\Http\Message\Request no longer needs an internal Cookie object
* Making the default glue for HTTP headers ';' instead of ','
* Adding a removeValue to Guzzle\Http\Message\Header
* Adding getCookies() to request interface.
* Removing unused AUTH_BASIC and AUTH_DIGEST constants from
* Guzzle\Http\Message\RequestInterface
* Lots of cleanup in the Guzzle\Http\Parser\Cookie\CookieParser
* Cleaning up Cookie related tests
2012-06-02 21:38:05 -07:00
Michael Dowling
f48f686e7a [Service] Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand 2012-05-30 23:32:30 -07:00
Michael Dowling
06834146d7 [Http] BC: Cleaning up how POST files are stored on entity enclosing requests 2012-05-30 18:49:29 -07:00
Michael Dowling
7be24404cc [Service] Parsing location and type arguments when ApiParam objects are created instead of each type they are validated or turned into commands. 2012-05-30 17:18:37 -07:00
Michael Dowling
1d9bef8a38 [Service] Adding a way to track the number of requests sent by a resource iterator 2012-05-30 11:21:30 -07:00
Michael Dowling
2470715f9b [Http] Not requiring status codes or reason phrases to match a predefined list. Closes #64. 2012-05-29 16:33:52 -07:00
Michael Dowling
3073b40e41 [Common] Not requiring an inspector for any_match. Removing all previously set mock listeners when adding a new mock observer in tests. 2012-05-29 14:37:24 -07:00
Michael Dowling
6dfd3d2809 [Http] Adding an AsyncPlugin 2012-05-24 20:15:58 -07:00
Michael Dowling
c877894bcb [Common] Allowing dot notation for classes when using the instance_of validation constraint. Now works with JSON service descriptions. 2012-05-24 13:53:23 -07:00
Michael Dowling
21e5afccbf Merge remote-tracking branch 'davedevelopment/nested-post-with-files' 2012-05-24 13:09:06 -07:00
Michael Dowling
7cfd7e765b [Service] Allowing the result of a command to be changed 2012-05-24 13:06:16 -07:00
David Abdemoulaie
05f819ee51 Updating test to reflect correct version string 2012-05-24 10:36:19 -05:00
Dave Marshall
fe9e122d9e Aggregate and encode data before passing to curl 2012-05-24 11:55:26 +01:00
Michael Dowling
d2b59d2680 [Common] Adding an any_match validation constraint that passes if any constraints pass 2012-05-23 23:05:37 -07:00
Michael Dowling
c98b0fe29e Making getServer() and getServiceBuilder() static in tests. Fixing magic method calls on clients 2012-05-23 12:21:09 -07:00
Michael Dowling
c9aca2daad Refactoring how the Inspector works with commands.
Filters are run after type validation.
Adding a functional test to ensure some of the JSON example service
description use cases will work.
Instead of the slew of boolean options the validateConfig() method
required, I added a initConfig() method to add default and static values
to a collection, and removed all validation and idempotent specific args
from validateConfig().  When a commmand is instantiated, default and
static values are added as appropriate.  When a command is being
prepared, defaults and statics are again added, but parameters are also
validated (assuming type validation was not globally disabled on the
inspector).
2012-05-22 23:58:29 -07:00
Michael Dowling
d25fc74fa0 [Http] Adding support for Content-Type in POST upload and multiple POST
uploads for the same filename.

You can specify the Content-Type of each separate multipart upload.  The
Content-Type of each file is automatically guessed if possible, and if
content-type is not explicitly set to false. Resolves #55.

[BC] Refactoring how POST files are stored on an EntityEnclosingRequest.
They are no longer mixed with the POST fields, but rather stored in an
array of separate POST files, each array key corresponding to a POST
field name, and array value containing an array of
associative arrays containing the 'file' and 'type' for each POST file.

You can still specify files and fields when using a client or request
factory, but no longer with an EntityEnclosingRequest->setPostField()
call.

Adding new POST data operations for easier manipulation of POST data.

You can now set empty POST fields.  Closes #56.

The body of a request is only shown on EntityEnclosingRequest objects
that do not use POST files.
2012-05-22 23:30:05 -07:00
Michael Dowling
2529aaa3b1 Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. 2012-05-22 14:33:11 -07:00
Michael Dowling
68e7a72f21 CS updates. Updating FromConfigInterface
[BC] FromConfigInterface, the interface that most classes with a factory
method extend from, now specifies the $config option as optional and
uses an array by default.  Be sure to update any client factory method
signatures.
2012-05-21 14:08:11 -07:00
everzet
0e3bdd661a added support for forms with method="get"
there's some forms with method unset or method="get",
like http://en.wikipedia.org/wiki/Main_Page. Those pages
were failing before this commit
2012-05-20 18:02:11 +02:00
Michael Dowling
468b3b71a8 [Http] Better handling of nested scope requests in CurlMulti
Requests are now prepared in the send() method rather than the add()
method when adding a request during a transfer.  The send() method now
only prepares requests in the current scope in which the send method was
called.  This allows for better handling of commands that require a
request in order to prepare themselves for sending (e.g. a request that
requires a token that requires an HTTP request).  The BatchQueuePlugin
and CommandSet no longer add requests using async as that was a hack to
support the previous implementation.
2012-05-19 15:47:10 -07:00
Michael Dowling
cd8f008050 Removing XmlElement. Updating changelog 2012-05-19 01:23:07 -07:00
Michael Dowling
7b1ba96086 [BC] Making Inspector::parseDocBlock protected and all commands now have
an ApiCommand.
2012-05-19 01:13:07 -07:00
Michael Dowling
b6443f301e Removing NullObject 2012-05-18 22:43:03 -07:00
Michael Dowling
5dfee7b2ea Addings empty() checks and substr() to EntityEnclosingRequest so that Uninitialized string offset: 0 errors are avoided. Closes #53 2012-05-16 10:01:13 -07:00
Michael Dowling
a02c22fcb7 Removing (optional) from docblocks 2012-05-16 00:55:45 -07:00
Michael Dowling
18b6bf284e Updating to latest version of composer 2012-05-15 08:38:38 -07:00
Michael Dowling
f63b853605 Adding an addRequest method to the BatchQueuePlugin. Fixing a docblock for CurlMulti 2012-05-14 22:34:10 -07:00
Michael Dowling
800ac34b5f Trimming up the default User-Agent header and putting entries in order of importance 2012-05-14 21:46:23 -07:00
Michael Dowling
9863ff6a06 Reafactoring Cookie parsing a bit 2012-05-14 21:36:28 -07:00
Michael Dowling
4a7f4870b7 [Http] Moving UriTemplates to Guzzle\Http\Parser\UriTemplate namespace (hoping for a C implementation at some point for PHP). 2012-05-14 13:48:52 -07:00
Michael Dowling
f8e8c0302b Refactoring service builders and service factories
[BC] [Service] Moving Guzzle\Service\Builder to
Guzzle\Service\Builder\ServiceBuilder
[Service] Creating an AbstractFactory used to delegate class
instantiation to a concrete factory. Used with service builders and
service descriptions
[Service] Making service descriptions and builders cacheable
[Service] Adding the ability to set global option overrides to service
builder configs. These options are applied to each service owned by a
service builder.  This can be used to globally specify access keys for
example.
[Service] Adding the ability to include other service builder config
files from within XML and JSON files.
[Service] Changing the format of XML and JSON configs.  Old format still
works too.
[Service] Moving XML service description includes to the end of
execution, so that includes are at the beginning of the parsed array.
[Service] Adding a Guzzle\Service\JsonLoader for loading JSON files that
have an { "includes": [] } array
2012-05-13 23:30:13 -07:00
Michael Dowling
72b8a76b4e Moving getUrlPartsFromMessage from a static method to an abstract class 2012-05-13 14:43:12 -07:00
Michael Dowling
764d935694 Changes to support a Guzzle\Http\Parser namespace
[Common] Adding keySearch method to Collection
[Http] Moving POST curl option logic from EntityEnclosingRequest to the
curl factory method
Directly using the HTTP request object when creating curl handles in the
factory method
No longer adding a read callback when sending POSTs through
CURLOPT_POSTFIELDS
In an effort to mitigate random segfaults and bus errors, using a queue
for removing curl and close handles from a multi object so that they are
only removed when the multi handle has finished sending all requests.
Calling reset() each time a curl multi handle has finished all requests.
EntityEnclosingRequest::getPostFields() now returns a Collection object
Simplifying the EntityEnclosingRequest::getPostFiles method
Adding an array cache to header objects
Moving the header comparison DSL from the Tests namespace to
Guzzle\Http\Message\HeaderComparison, and adding tests.
Adding message, cookie, and url parser interfaces and default
implementations.
Using a parser registry to manage globally registered parsers.  Removing parsing from Response and RequestFactory.
Renaming protocol_version to version
Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args.
Simplifying the chunked encoding handling in RequestFactory
Moving cookie parsing out of the cookie plugin and into Guzzle\Http\Parser\Cookie\CookieParser
Removing regexps from the cookie parser and simply using stripos
Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method.
Adding more logging to node.js test webserver
Adding pecl_http message parser.
Installing pecl when travis boots up
2012-05-13 01:23:32 -07:00
Michael Dowling
82d483d0e8 [Service] Inspector can be injected into a Command object 2012-05-12 00:42:07 -07:00
Michael Dowling
dc4c2d089b Getting rid of Guzzle\Common\Guzzle
Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject
Adding Guzzle\Version class to give version information
Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and
getHttpDate()
Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data
2012-05-12 00:28:36 -07:00
Michael Dowling
ff6cd9e5c0 Moving Guzzle\Guzzle to Guzzle\Common\Guzzle 2012-05-11 22:20:41 -07:00
Michael Dowling
4fa45e6816 Changing else if to elseif 2012-05-11 21:04:42 -07:00
Michael Dowling
4749e67cff Fixing a bug with iterators when no command options are specified 2012-05-11 17:26:18 -07:00
Michael Dowling
dd975e6a76 Fixing a bug in the service builder when using json configs and no class attribute is specified. 2012-05-11 17:21:23 -07:00
Michael Dowling
776818c90e [Service] Adding a setOnComplete method to commands that is used to specify a callable that is called when a command completes. This callable can also be specified in the command.on_complete option of a command in the constructor. 2012-05-10 22:26:50 -07:00
Michael Dowling
bf36281fcb Fixing broken test 2012-05-09 15:11:37 -07:00
Michael Dowling
2a10ffca92 Trying to fix failing Travis test 2012-05-09 14:43:44 -07:00
Michael Dowling
666e0439c3 [Service] Moving resource iterator classes to Guzzle\Service\Resource.
Adding ResourceIteratorFactoryInterface with a class name resolution
implementation.  Adding a resource iterator factory to
Guzzle\Service\Client and adding a getIterator method to make it easy to
retrieve iterators from the client.
2012-05-09 14:07:55 -07:00
Michael Dowling
bf1fd13ac0 Merge branch 'execute_command_returns_result' 2012-05-09 09:11:55 -07:00
Michael Dowling
b29c7adc51 [Service] Adding a ResourceIteratorInterface. Adding get() and set()
methods for easy manipulation of resource iterator data options.  Adding
setLimit() and setPageSize() methods to resource iterators.  Fixing a
bug in the resource iterator that caused endless iteration if a result
is fetched with no resources returned from the sendRequest method.
2012-05-08 21:25:11 -07:00
Michael Dowling
5ff7456cc0 [Service] Adding an 'array' type validator
[Tests] Returning the mock plugin created by calling $this->setMockResponse()
2012-05-08 17:23:32 -07:00