Lines Matching refs:to

4 5.0 to 6.0
8 Due to the fact that these messages are immutable, this prompted a refactoring
9 of Guzzle to use a middleware based system rather than an event system. Any
10 HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be
11 updated to work with the new immutable PSR-7 request and response objects. Any
12 event listeners or subscribers need to be updated to become middleware
29 Note: there has been movement in the React project to modify promises to
31 2. Guzzle needs to have the ability to synchronously block on a promise to
34 3. Because we need to be able to wait on a result, doing so using React
38 - `GuzzleHttp\Mimetypes` has been moved to a function in
42 strings must now be passed into request objects as strings, or provided to
44 option uses PHP's `http_build_query` to convert an array to a string. If you
45 need a different serialization technique, you will need to pass the query
49 - Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware
52 present in RingPHP have been modified to work directly with PSR-7 messages
59 it is possible to add your own type of event system that is powered by the
80 - Static functions in `GuzzleHttp\Utils` have been moved to namespaced
82 based autoloader or you to include functions.php.
83 - `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to
87 migration to strictly adhering to PSR-7 as the interface for Guzzle messages,
88 adding methods to message interfaces would actually require Guzzle messages
89 to extend from PSR-7 messages rather then work with them directly.
91 ## Migrating to middleware
93 The change to PSR-7 unfortunately required significant refactoring to Guzzle
94 due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event
96 side effects in order to work. With immutable messages, you have to change your
97 workflow to become more about either returning a value (e.g., functional
101 Instead of using the event system to listen for things like the `before` event,
105 with PSR-7 middleware. Due to the use of promises, the middleware system is
113 // Get the emitter and listen to the before event.
123 middleware. The idiomatic way in v6 to modify the request/response lifecycle is
124 to setup a handler middleware stack up front and inject the handler into a
133 // Notice that we have to return a request object
144 strings or array of strings and is used to serialize an
147 option is now used to send a multipart/form-data POST request.
149 `GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add
150 POST files to a multipart/form-data request.
152 The `body` option no longer accepts an array to send POST requests. Please use
155 The `base_url` option has been renamed to `base_uri`.
157 4.x to 5.0
162 Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send
164 is still supported, but it has now been renamed to `handler`. Instead of
197 events. This control mechanism was used to stop a transfer of concurrent
206 a similar behavior in a number of ways. One example might be to use a
207 FnStream that has access to the transaction being sent. For example, when the
210 written to.
212 ## Updates to HTTP Messages
215 `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
220 3.x to 4.0
226 - No longer requires cURL to send requests.
239 The `Guzzle\Batch` namespace has been removed. This is best left to
240 third-parties to implement on top of Guzzle's core HTTP library.
245 has been implemented yet, but hoping to utilize a PSR cache interface).
249 - Removed all of the wrapped exceptions. It's better to use the standard PHP
257 - `getAll` has been removed. Use `toArray` to convert a collection to an array.
262 - `setPath` now supports appending to an existing array via the `[]` notation.
276 - `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and
277 `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the
283 - Use the `once()` method to add a listener that automatically removes itself
285 - Use the `listeners()` method to retrieve a list of event listeners rather than
287 - Use `emit()` instead of `dispatch()` to emit an event from an emitter.
301 Use the `on()` method to add a listener rather than the `addListener()` method.
314 - The cacert.pem certificate has been moved to `src/cacert.pem`.
315 - Added the concept of adapters that are used to transfer requests over the
320 events to asynchronously manage parallel request transfers.
321 - `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`.
322 - `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`.
326 `functions.php` for an easy to use static client instance.
327 - Exceptions in `GuzzleHttp\Exception` have been updated to all extend from
344 // or, to mirror the previous behavior
351 - The `send` method no longer accepts more than one request. Use `sendAll` to
362 `base_url` string or array to use a URI template as the base URL of a client.
364 request options. You can pass an `adapter` to use a custom adapter,
365 `batch_adapter` to use a custom adapter for sending requests in parallel, or
366 a `message_factory` to change the factory used to create HTTP requests and
371 `createRequest`, `get`, `put`, etc.) in order to expand a URI template.
375 Messages no longer have references to their counterparts (i.e., a request no
376 longer has a reference to it's response, and a response no loger has a
377 reference to its request). This association is now managed through a
378 `GuzzleHttp\Adapter\TransactionInterface` object. You can get references to
391 - `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to
392 `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create
396 must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface`
397 to control the format of a POST body. Requests that are created using a
405 $request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r')));
413 pass an optional argument of `true` to retrieve a header value as an array
415 - `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to
421 been updated to properly handle headers that contain parameters (like the
428 system to retrieve this type of information.
432 methods have moved to the CacheSubscriber.
437 system to work with request and response objects as a transaction.
480 EntityBody interfaces and classes have been removed or moved to
497 emitted over the lifecycle of a request has been significantly reduced to make
498 it easier to understand how to extend the behavior of a request. All events
501 methods and a way in which to modify the transaction at that specific point in
504 - `request.before_send` has been renamed to `before` and now emits a
506 - `request.complete` has been renamed to `complete` and now emits a
513 - `curl.callback.progress` has been removed. Use a custom `StreamInterface` to
515 - `curl.callback.write` has been removed. Use a custom `StreamInterface` to
517 - `curl.callback.read` has been removed. Use a custom `StreamInterface` to
545 it's easier to just wrap an iterator in a generator that maps values.
551 The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The
554 moved to `GuzzleHttp\Subscriber\Log\Formatter`.
558 The `Guzzle\Parser` namespace has been removed. This was previously used to
559 make it possible to plug in custom parsers for cookies, messages, URI
563 - Cookie: Cookie parsing logic has been moved to
566 to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only
568 Guzzle as a library to add this level of complexity to parsing messages.
569 - UriTemplate: URI template parsing has been moved to
574 then developers are free to subclass `GuzzleHttp\Url`.
578 The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`.
582 code has moved to `GuzzleHttp\Cookie`.
588 sending. This subscriber is attached to all requests by default.
591 The following plugins have been removed (third-parties are free to re-implement
603 - `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler
604 to build custom retry policies using simple functions rather than various
606 - `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to
608 - `Guzzle\Http\Plugin\Log\LogPlugin` has moved to
610 - `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to
612 - `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to
614 - `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to
629 Stream have moved to a separate package available at
632 `Guzzle\Stream\StreamInterface` has been given a large update to cleanly take
635 of methods implemented by the `StreamInterface` has been drastically reduced to
636 allow developers to more easily extend and decorate stream behavior.
640 - `getStream` and `setStream` have been removed to better encapsulate streams.
650 - `detachStream` has been renamed to `detach`.
651 - `feof` has been renamed to `eof`.
652 - `ftell` has been renamed to `tell`.
653 - `readLine` has moved from an instance method to a static class method of
658 `GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams
670 3.6 to 3.7
675 - You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.:
696 …st.options` as a parameter for a client configuration and as an optional argument to all creational
697 request methods. When paired with a client's configuration settings, these options allow you to spe…
708 'command.response_body' => '/path/to/file'
711 // Should be changed to:
716 'save_as' => '/path/to/file'
722 Additions and changes (you will need to update any implementations or subclasses you may have creat…
724 - Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
726 - Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::…
727 - Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
728 - Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
730 …resource, string, or EntityBody into the $options parameter to specify the download location of th…
731 - Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$da…
737 that implement them, but you should update your code to use alternative methods:
758 - `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(Reque…
760 - `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
761 - `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
764 $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
768 3.5 to 3.6
771 * Mixed casing of headers are now forced to be a single consistent casing across all values for tha…
772 * Messages internally use a HeaderCollection object to delegate handling case-insensitive header re…
777 …HeaderFactory which can map specific headers to specific header classes. There is now a Link heade…
779 * Moved getLinks() from Response to just be used on a Link header object.
781 …usly relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the
790 … optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
801 * The ability to case-insensitively search for header values
812 * Removed the injecting of a request object onto a response object. The methods to get and set a re…
814 * Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now reques…
816 * Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle i…
820 3.3 to 3.4
825 3.2 to 3.3
838 …am::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase.
845 3.1 to 3.2
851 to a single client can pollute requests dispatched from other clients.
853 If you still wish to reuse the same CurlMulti object with each client, then you can add a listener
854 ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into eac…
859 $builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json');
889 response information. You can, however, get access to the request and response object by calling `g…
898 2.8 to 3.x
903 Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig`
957 ### Convert XML Service Descriptions to JSON
970 <doc>Uses a search query to get a list of groups</doc>
1001 "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users",
1011 "summary": "Uses a search query to get a list of groups",
1047 "description":"Group to delete by ID",
1060 "description":"Group to get by ID",
1073 "description":"Group to update by ID",
1201 …setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to