1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-25 02:22:57 +01:00

278 Commits

Author SHA1 Message Date
Michael Dowling
b1beeb68d8 One more time trying to fix the timeout test... 2012-04-17 17:48:55 -07:00
Michael Dowling
8ce1fbed17 Fixing CurlHandleTest to timeout more consistently 2012-04-16 12:37:40 -07:00
Michael Dowling
02f9785f93 [Service] Adding an AliasFactory for aliasing one command name to another. Updating README for new composer setup. Making the build script more generalized. 2012-04-15 12:00:12 -07:00
Michael Dowling
d29e7f3bba [Service] Adding command factories to Guzzle\Service\Client. Gives the ability to add custom handling for associating command names with concrete classes.
Removing command factories from Guzzle\Service\Description\ServiceDescription.  Use Guzzle\Service\Command\Factory\ServiceDescriptionFactory instead.
Setting a service description on a client will update any attached service description factories.
2012-04-15 00:07:45 -07:00
Michael Dowling
eabe684b22 [Common] [BC] Renaming ZendLogAdapter to Zf1LogAdater. Adding a Zf2LogAdapter. Renaming ZendCacheAdapter to Zf1CacheAdapter. Adding Zf2CacheAdapter to support Zend Framework 2 caching.
Updating the cache interface to allow passing options to cache methods.
Removing the constructor and removing getCachedObject from CacheAdapterInterface.
Adding a ClosureCacheAdapter.
[Service] Adding the ability to use magic call method behavior for executing commands by name.  Closes #39.
[Tests] Fixing a logging unit test so that it does not spit out to stdout
Separating test dependencies from Guzzle deps by adding a composer-test.json.
Adding unit testing capabilities to the Guzzle phar files.
Updating travis-ci script to use new composer file and adding code coverage to travis runs
[Build] Fixing guzzle-min.phar warning that tried to load index.php
Adding a test-init phing target to help getting setup for testing.
Fixing composer run in travis
2012-04-14 18:49:51 -07:00
Michael Dowling
5ad66ff4d1 [Http] Adding the ability to disable the Expect: 100-Continue header from being sent. Simply remove the "Expect" header from a request before sending. You can remove the Expect header from all requests sent from a client by adding an event listener to a client. Closes #35.
Adding the ability to set HTTP request headers to NULL so that they are still passed to curl.  This is useful for removing some default curl headers.  Empty headers are still not sent to curl.

Not setting "Expect: 100-Continue" when sending with application/x-www-form-urlencoded POST requests
2012-04-02 17:27:37 -05:00
Michael Dowling
729b346685 Fixing .travis.yml
Commenting out PATCH test that is not working on travis
2012-03-26 23:01:18 -05:00
Michael Dowling
c990901dd3 [BC] Removing prepareRequest() from client interface and making it a protected method of the client
Adding a RequestFactoryInterface and a way to inject a request factory into a Client object
2012-03-26 21:16:19 -05:00
Michael Dowling
85803bdd05 Adding the ability to set default HTTP headers that will be set on all requests created by a client. Closes #37. 2012-03-25 22:23:47 -05:00
Michael Dowling
bc3acaf817 Allowing deeply nested query string values with PHP style aggregation. Closes #27 2012-03-24 17:10:20 -05:00
Michael Dowling
4a0cb15350 [Http] Removing final keyword from client verb methods
Adding PATCH method
Fixing docblock for PUT method
Updating request message parsing to allow for custom verbs
Adding a Content-Length: 0 header when sending an entity enclosing request with no body or post fields.  Closes #34
2012-03-19 22:03:41 -05:00
Michael Dowling
46d50a577c CS updates 2012-03-06 11:13:16 -06:00
Chris Boden
b44740bfed [Http][Tests] Serialization test
TDD for ArrayCookieJar serialization
2012-03-06 11:06:06 -05:00
Julian Higman
37e7e7d6ba Fixed up some indents - spaces instead of tabs. 2012-03-01 21:54:01 +00:00
Julian Higman
55796569dd Added CurlAuthPlugin as a generic plugin for curl auth methods. Removed
BasicAuthPlugin and DigestAuthPlugin.
2012-03-01 11:11:36 +00:00
Julian Higman
e2eb6140bc Added DigestAuthPlugin, based heavily on the BasicAuthPlugin. 2012-02-29 12:25:57 +00:00
Michael Dowling
4227abdf0b [Http] Using cookies.disable on a params object to disable the cookie plugin for a specific request 2012-02-22 21:47:02 -06:00
Michael Dowling
6edccc2db8 [Http] Fixing issue related to nested POST data. Resolves #20 2012-02-13 20:28:33 -06:00
Michael Dowling
f3a5b01236 [Http] Allowing mutliple query string parameters to be used by the same name when using the aggregateUsingDuplicates aggregation function. Addresses #22. 2012-02-13 20:16:32 -06:00
Michael Dowling
41246dfd29 [Http] Parsing query strings manually to allow for multiple values per query string and to not convert decimals and spaces into underscores. Resolves #21 2012-02-13 19:57:47 -06:00
Michael Dowling
b9c04909c7 Adding support for URI templates
[Http] UriTemplate syntax supports {} or {{}} for backwards compatibility.
[Http] Guzzle::inject() now allows {} or {{}} injection for consistency.
[Http] BC: removing Guzzle\Http\Client::inject and now using Guzzle\Http\Client::expandTemplate.
[Http] Can use a custom syntax for URI templates (this might be useful for something like Solr because Solr actually uses {}).
[Http] Adding the ability to inject a custom UriTemplate into clients or just use the default UriTemplate
[Http] You can now use an array when creating a request via a client to specify a URI template and additional template variables.
[Service] Adding support for URI templates to service descriptions.
[Service] [BC] removing Guzzle\Service\Description\ApiCommand::getPath() and replacing it with getUri().
[Service] Use "uri" instead of "path" when creating service descriptions.  However, there is still backwards compatibility with the "path" attribute.
2012-02-07 23:23:39 -06:00
Michael Dowling
2ca59100ff Fixing broken test 2012-01-27 10:42:37 -06:00
Michael Dowling
32b1944eba [Common] Fixing monolog log adapter log levels. Adding a check to CurlHandleTest to ensure that the body of a request is sent in a chunked PUT request. 2012-01-27 01:47:59 -06:00
Michael Dowling
eb79d98009 [Http] Adding helper DSL to compare filtered HTTP headers with actual HTTP headers.
Adding more coverage to CurlHandle so that the actual HTTP requests being sent are being checked.
Fixing EntityEnclosingRequests so that the Content-Type is not removed when setting the body of a request.
This allows a custom Content-Type to be specified in a factory method.
2012-01-25 22:38:17 -06:00
Michael Dowling
9a9ae3b6be [Http] Using CURLOPT_INFILESIZE instead of Content-Length headers. This prevents chunked transfer encoding when the Content-Length is known. Adding better test coverage. 2012-01-25 11:26:25 -06:00
Michael Dowling
f619d8fa0e [Http] Fixing issue that caused two Content-Length headers. Adding better test coverage for Content-Length and chunked Transfer-Encoding. Removing some duplicate tests. 2012-01-25 11:02:08 -06:00
Michael Dowling
f92c049df5 Moving the onComplete handling of Guzzle\Http\Message\RequestInterface to the Symfony EventDispatcher. Subscribe to the request.error event to imlpement your custom error handling. Use $event->stopPropagation() to override the default error handling for unsuccessful responses. request.success is now called any time a request completes successfully. 2012-01-23 18:50:02 -06:00
Michael Dowling
109bad53d3 [Http] Adding OAuth 1.0 signature plugin 2012-01-22 17:48:25 -06:00
Michael Dowling
2986444944 [Service] Fixing headers set using an array on commands via the constructor
Removing special handling of ClosureCommand
Throwing an exception when required parameters are missing from a dynamic command
Pass ApiCommand objects to a ClosureCommand in the second argument of the constructor, not in the api_command parameter key
Adding Guzzle\Service\Command\DynamicCommand that will prepare HTTP requests based on an API command. Extend this class for advanced response processing for API commands.
Making DynamicCommand the default command for ApiCommands
Removing the old DynamicCommandFactory and replacing with a simpler ApiCommandFactory
2012-01-21 19:08:15 -06:00
Michael Dowling
7fdae5b984 [Service] Automatically converting command results with an application/json Content-Type to an array 2012-01-20 16:58:30 -06:00
Michael Dowling
829d8ae178 Fixing the cache.revalidate parameter 2012-01-20 00:28:15 -06:00
Michael Dowling
8aee7da90c [Http] Adding check in CurlMulti to ensure that a request handle exists before operating on it. \
Adding fix so that when a revalidation response returns a 200 response and the response is cacheable, the cached data uses the maximum age of the new response (not the default ttl) \
Adding fix so that when a revalidation response contains updated caching headers, the cached response data is updated \
Added fix so that when a revalidation response is a 404, the cached data is deleted and the 404 exception is thrown \
Renaming the ``cache.revalidate`` options that can be set in the params of a request from "accept" => "never" and "decline" => "always"
2012-01-19 23:43:25 -06:00
Michael Dowling
35bfd843d2 [Http] Adding better coverage to onComplete callbacks in requests. Allowing a response to be overridden in an onComplete callback by returning a Response object in the callback. 2012-01-17 23:35:10 -06:00
Michael Dowling
40027b0fff [Service] Fixing the creation of ClosureCommands when using the DynamicCommandFactory 2012-01-16 16:54:21 -06:00
Michael Dowling
86d21e1fc5 Fixing the setMockResponse() method for GuzzleTestCase 2012-01-16 11:14:41 -06:00
Michael Dowling
d7e332bb64 [Http] Adding a BatchQueuePlugin to make it easier to queue requests and flush the queue implicitly or explicitly 2012-01-15 10:36:28 -06:00
Michael Dowling
4c46e77015 Guzzle 2.0
Adopting composer for dependency management
Updating LICENSE, travis build file, making better use of git ignores, and remove unused build target
Removing @author tags.  Use the commit history for a changelog.
Moving files from build folder to /
Adding min build target to product a Guzzle only phar with no autoloader
[Common] Accepting ZF1 or ZF2 cache in ZendCacheAdapter
[Common] Optimizing Stream wrapper and EntityBody abstractions.
[Common] [Http] Migrating from Guzzle event system to the Symfony2 event dispatcher
[Common] Moved Inflector and Inspector to Service namespace
[Http] Simplifying Guzzle\Guzzle curl detection
[Http] Removing Guzzle\Http\Pool and now using Guzzle\Http\Curl\CurlMulti
[Http] The helper methods from Guzzle\Http\Message\RequestFactory have been removed to prevent confusion and encourage developers to use Guzzle\Http\Client to create requests.
[Http] Clients can now send one or more requests in an array using the send() method, so the batch() method was removed.
[Http] Updating curl multi to allow blocking calls while sending other transfers
[Http] Making the Request::hasHeader method more intuitive.  Guzzle\Http\Message\AbstractMessage::hasHeader() now returns true if the header is found using exact matching.  If the header is found using a regex or case-insensitive match, then it will return the name of the found header.
[Http] Removing content-type guessing from EntityBody based on file extension and solely using finfo.
[Http] Adding basic auth plugin
[Http] Cleaning up CookieJar and CurlMulti
[Http] Removing custom rawurlencode from QueryString because PHP 5.3 now properly deals with tilde characters.
[Http] Minor optimization to parsing messages in RequestFactory
[Http] Adding Guzzle\Http\Client for developers that don't need commands or service descriptions
[Http] Making it easier to set a global User-Agent header for a Guzzle\Http\Client
[Http] Fixing the discrepancies between the ClientInterface and Guzzle\Http\Client
[Http] Adding the ability to set and retrieve tokenized headers from Requests and Responses
[Service] Ditching NIH filters and using the Symfony2 validator
[Service] Moving most service building logic to the ServiceBuilder::factory method so that it is easier to build custom config readers.
[Service] Allowing deep nested command inheritance.
[Service] Cleaning up Inflector caching.
[Service] Getting rid of concept of can_batch because everything is now sent in parallel.
[Service] Adding a JSON description builder.
[Service] Cleaning up ResourceIteratorApplyBatched.
[Service] Removing caching stuff from ServiceBuilder because the data being cached is extremely fast to generate.
[Service] Added a method to serialize the ServiceDescription in case a ServiceDescription needs to be cached in an application.
[Service] Making description builders use static methods.
[Service] Adding support to include other description files for XML and JSON description builders.
[Service] Adding support for filters to ApiCommands
[Service] Using {{}} instead of $. to reference other services as a dependency for another service
2012-01-14 13:57:05 -06:00
Michael Dowling
31cf95ab47 Fixing mocks for tests 2011-11-18 13:22:06 -06:00
Michael Dowling
45e5f83e58 [Service] Clients will now create a command set for you if you pass an array of commands to the execute method 2011-11-13 19:56:54 -06:00
Michael Dowling
3946b93bbf [Tests] Getting code coverage back to 100% 2011-11-13 16:46:37 -06:00
Michael Dowling
b5f0507a0c [Tests] Adding .travis.yml
Removing logging from node server
Fixing history plugin test
Fixing bzip2 test
Fixing timestamp test
2011-11-13 13:30:34 -06:00
Michael Dowling
64bfbbd466 [Tests] Fixing tests after PHPUnit upgrade 2011-11-13 00:38:41 -06:00
Michael Dowling
d390a5f2e3 [Service] Making it easier to send requests in parallel using the batch() command of a client. Updating tests to use MockPlugin 2011-11-12 21:19:22 -06:00
Michael Dowling
503c16668e [Tests] Adding `@server annotation to tests that require access to the node.js server. If you cannot install node.js, use phpunit --exclude-group server` to run the other tests. 2011-11-12 19:31:00 -06:00
Michael Dowling
17b9a70d9a [Service] Mock plugin accepts an array of responses in the constructor 2011-11-11 22:56:10 -06:00
Michael Dowling
4a263abf59 Adding more coverage 2011-11-11 18:53:12 -06:00
Michael Dowling
3acd76070a [Service] Allowing client to be instantiated without a base URL 2011-11-11 18:24:53 -06:00
Michael Dowling
6848b4a91f [Service] Updating Guzzle\Service\Client to be identical to RequestFactory. Injecting client configs when {{}} are present 2011-11-11 17:08:35 -06:00
Michael Dowling
efe275f300 [Http] Making EntityBody create an empty temp stream by default if no resource is provided 2011-11-11 10:16:11 -06:00
Michael Dowling
af5cdbda6e [Http] Adding HistoryPlugin. Closes #8 2011-11-10 23:04:19 -06:00