It should be easy if you didn't override or extend Graby. I tried to typehint everything (method parameters, method return, variable, etc.).
So you must update methods you overridden.
- Support for PHP < 7.4 has been dropped
- Support for PHP < 7.1 has been dropped
- PHP extension tidy is now a requirement
Graby 1 was hardly tied to Guzzle 5.
Graby 2 supports any HTTP client implementation. It is currently tested against:
- Guzzle 6
- Guzzle 5
- cURL
Here is how to install Graby with Guzzle 6:
composer require j0k3r/graby php-http/guzzle6-adapter
Then:
use Graby\Graby;
use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;
$graby = new Graby([], new GuzzleAdapter(new GuzzleClient()));
http_client.timeout
option is gone, you should now implement it using the adapter of your choice, see this part of the README.
all_headers
becameheaders
open_graph
no longer exist (title, image & locale are merged into global result)content_type
no longer exist (check headers key instead)