diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 18da1301..3c1fd247 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -163,7 +163,7 @@ jobs: - name: "Setup adapter: Guzzle 5" run: | - composer remove guzzlehttp/guzzle php-http/guzzle6-adapter --dev -n + composer remove guzzlehttp/guzzle php-http/guzzle7-adapter --dev -n composer require php-http/guzzle5-adapter --dev -n - name: "Setup logs" @@ -172,46 +172,6 @@ jobs: - name: "Run PHPUnit" run: "php vendor/bin/simple-phpunit -v" - phpunit-guzzle7: - name: "PHPUnit (PHP ${{ matrix.php }} and Guzzle 7)" - runs-on: "ubuntu-20.04" - - strategy: - matrix: - php: - - "7.4" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - with: - fetch-depth: 2 - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - php-version: "${{ matrix.php }}" - coverage: "none" - tools: composer:v2 - extensions: tidy - ini-values: "date.timezone=Europe/Paris" - env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v1" - - - name: "Setup adapter: Guzzle 7" - run: | - composer remove guzzlehttp/guzzle php-http/guzzle6-adapter --dev -n - composer require php-http/guzzle7-adapter --dev -n - - - name: "Setup logs" - run: "mkdir -p build/logs" - - - name: "Run PHPUnit" - run: "php vendor/bin/simple-phpunit -v" - phpunit-curl: name: "PHPUnit (PHP ${{ matrix.php }} and cURL)" runs-on: "ubuntu-20.04" @@ -243,9 +203,8 @@ jobs: - name: "Setup adapter: cURL" run: | - composer remove php-http/guzzle6-adapter --dev -n + composer remove php-http/guzzle7-adapter --dev -n composer require php-http/curl-client --dev -n - composer require zendframework/zend-diactoros --dev -n - name: "Setup logs" run: "mkdir -p build/logs" diff --git a/README.md b/README.md index 1b671ac2..b7e617c3 100644 --- a/README.md +++ b/README.md @@ -50,15 +50,17 @@ That's why I made this fork: Add the lib using [Composer](https://getcomposer.org/): - composer require j0k3r/graby php-http/guzzle6-adapter + composer require j0k3r/graby php-http/guzzle7-adapter -Why `php-http/guzzle6-adapter`? Because Graby is decoupled from any HTTP client implementation, thanks to [HTTPlug](http://httplug.io/) (see [that list of client implementation](https://packagist.org/providers/php-http/client-implementation)). +Why `php-http/guzzle7-adapter`? Because Graby is decoupled from any HTTP client implementation, thanks to [HTTPlug](http://httplug.io/) (see [that list of client implementation](https://packagist.org/providers/php-http/client-implementation)). Graby is tested & should work great with: -- Guzzle 6 (using `php-http/guzzle6-adapter`) +- Guzzle 7 (using `php-http/guzzle7-adapter`) - Guzzle 5 (using `php-http/guzzle5-adapter`) -- cURL (using `php-http/curl-client` and a PSR-17 response factory [from this list](https://packagist.org/providers/psr/http-factory-implementation)) +- cURL (using `php-http/curl-client`) + +Note: if you want to use Guzzle 6, use Graby 2 (support has dropped in v3 because of dependencies conflicts, which does not happen with Guzzle 5 :shrug:) ### Retrieve content from an url @@ -196,12 +198,12 @@ configure it and inject it to `Graby\Graby`. $graby = new Graby([], new GuzzleAdapter($guzzle)); ``` -- For Guzzle 6: +- For Guzzle 7: ```php use Graby\Graby; use GuzzleHttp\Client as GuzzleClient; - use Http\Adapter\Guzzle6\Client as GuzzleAdapter; + use Http\Adapter\Guzzle7\Client as GuzzleAdapter; $guzzle = new GuzzleClient([ 'timeout' => 2, diff --git a/composer.json b/composer.json index cd393108..222e2c27 100644 --- a/composer.json +++ b/composer.json @@ -18,26 +18,25 @@ "php": ">=7.4", "ext-curl": "*", "ext-tidy": "*", - "fossar/htmlawed": "^1.2.7", - "http-interop/http-factory-guzzle": "^1.0", - "j0k3r/graby-site-config": "^1.0.110", + "fossar/htmlawed": "^1.2.8", + "guzzlehttp/psr7": "^2.0", + "j0k3r/graby-site-config": "^1.0.139", "j0k3r/httplug-ssrf-plugin": "^2.0", - "j0k3r/php-readability": "^1.2.3", - "monolog/monolog": "^1.18.0|^2.0", - "php-http/client-common": "^2.3", - "php-http/discovery": "^1.12", + "j0k3r/php-readability": "^1.2.9", + "monolog/monolog": "^1.18.0|^2.3", + "php-http/client-common": "^2.5", + "php-http/discovery": "^1.14", "php-http/httplug": "^2.2", - "php-http/message": "^1.9", + "php-http/message": "^1.12", "simplepie/simplepie": "^1.5", "smalot/pdfparser": "^2.0", "symfony/options-resolver": "^3.4|^4.4|^5.3|^6.0", - "true/punycode": "^2.1", - "guzzlehttp/psr7": "^1.5.0" + "true/punycode": "^2.1" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.0", - "guzzlehttp/guzzle": "^6.3.0", - "php-http/guzzle6-adapter": "^2.0", + "guzzlehttp/guzzle": "^7.4", + "php-http/guzzle7-adapter": "^1.0", "php-http/mock-client": "^1.4", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.2",