diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8487aa..269107a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,12 +8,19 @@ jobs: strategy: fail-fast: false matrix: - php: [8.0, 8.1] - laravel: [9.*] - dependency-version: [prefer-lowest, prefer-stable] + php: [8.1, 8.2] + laravel: [11.*, 10.*, 9.*] + dependency-version: [prefer-stable] include: + - laravel: 11.* + testbench: 9.* + - laravel: 10.* + testbench: 8.* - laravel: 9.* testbench: 7.* + exclude: + - laravel: 11.* + php: 8.1 name: Tests - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }} steps: - name: Checkout code @@ -40,9 +47,9 @@ jobs: - name: Install Composer dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - name: Execute tests - run: vendor/bin/phpunit --verbose --coverage-clover ./build/coverage.clover + run: vendor/bin/phpunit --coverage-clover ./build/coverage.clover - name: Uploading code coverage to scrutinize uses: sudo-bot/action-scrutinizer@latest with: diff --git a/.scrutinizer.yml b/.scrutinizer.yml index d2460dd..d85e796 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -18,8 +18,9 @@ checks: fix_doc_comments: true build: + image: default-bionic environment: - php: 8.0.15 + php: 8.1.2 nodes: analysis: tests: diff --git a/README.md b/README.md index 65a796b..14b9bfb 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,8 @@ This package provides a convenient wrapper to the [Open Food Facts API](https:// ## Requirements -- PHP 8.0+ -- Laravel 9.x - -*Legacy support (PHP 7.2+ and Laravel 5.7-8.x) at [v0.2.x](https://github.com/openfoodfacts/openfoodfacts-laravel/tree/v0.2.2).* +- PHP 8.1+ +- Laravel 9.x, 10.x, 11.x ## Installation @@ -27,6 +25,12 @@ You can install the package via composer: composer require openfoodfacts/openfoodfacts-laravel ``` +#### Legacy support + +- PHP 8.0 (Laravel <=9.x): `composer require "openfoodfacts/openfoodfacts-laravel:^0.3"` +- PHP 7.2-7.4.x (Laravel 5.7-8.x): `composer require "openfoodfacts/openfoodfacts-laravel:^0.2"` + + ## Usage #### Find product details by barcode diff --git a/composer.json b/composer.json index 7339c6e..49c301f 100644 --- a/composer.json +++ b/composer.json @@ -16,15 +16,15 @@ } ], "require": { - "php": "^8.0.2", - "guzzlehttp/guzzle": "^7.2", - "illuminate/support": "^9.0", - "openfoodfacts/openfoodfacts-php": "^0.2.4" + "php": "^8.1", + "guzzlehttp/guzzle": "^7.4", + "illuminate/support": "^9.0|^10.0|^11.0", + "openfoodfacts/openfoodfacts-php": "^0.3.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.6", - "orchestra/testbench": "^7.0", - "phpunit/phpunit": "^9.5.8" + "friendsofphp/php-cs-fixer": "^3.9.5", + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.5.21|^10.5" }, "autoload": { "psr-4": {