From 96744d0d1781f066ca0584da64c4bd79fecad53b Mon Sep 17 00:00:00 2001 From: Quadrubo <71718414+Quadrubo@users.noreply.github.com> Date: Sat, 22 Apr 2023 20:05:05 +0200 Subject: [PATCH 01/11] feat: laravel 10 compatibility --- .github/workflows/ci.yml | 7 ++++++- composer.json | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b940835..14e82a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,11 +9,16 @@ jobs: fail-fast: false matrix: php: [8.0, 8.1] - laravel: [9.*] + laravel: [10.*, 9.*] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 10.* + testbench: 8.* - laravel: 9.* testbench: 7.* + exclude: + - laravel: 10.* + php: 8.0 name: Tests - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }} steps: - name: Checkout code diff --git a/composer.json b/composer.json index 7339c6e..2d4d940 100644 --- a/composer.json +++ b/composer.json @@ -18,12 +18,12 @@ "require": { "php": "^8.0.2", "guzzlehttp/guzzle": "^7.2", - "illuminate/support": "^9.0", + "illuminate/support": "^9.0|^10.0", "openfoodfacts/openfoodfacts-php": "^0.2.4" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.6", - "orchestra/testbench": "^7.0", + "orchestra/testbench": "^7.0|^8.0", "phpunit/phpunit": "^9.5.8" }, "autoload": { From c47079c110af6bfe10a65647673b3c1b5d3952b4 Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 10:50:24 +0200 Subject: [PATCH 02/11] require php 8.1 minimum --- .github/workflows/ci.yml | 5 +---- composer.json | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14e82a9..f88342b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.0, 8.1] + php: [8.1] laravel: [10.*, 9.*] dependency-version: [prefer-lowest, prefer-stable] include: @@ -16,9 +16,6 @@ jobs: testbench: 8.* - laravel: 9.* testbench: 7.* - exclude: - - laravel: 10.* - php: 8.0 name: Tests - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }} steps: - name: Checkout code diff --git a/composer.json b/composer.json index 2d4d940..44ed4b7 100644 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ } ], "require": { - "php": "^8.0.2", + "php": "^8.1", "guzzlehttp/guzzle": "^7.2", "illuminate/support": "^9.0|^10.0", - "openfoodfacts/openfoodfacts-php": "^0.2.4" + "openfoodfacts/openfoodfacts-php": "^0.3.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.6", + "friendsofphp/php-cs-fixer": "^3.9.5", "orchestra/testbench": "^7.0|^8.0", "phpunit/phpunit": "^9.5.8" }, From 9804f24e3c773d7d2c26c5422b70fd07b9207709 Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 11:06:12 +0200 Subject: [PATCH 03/11] laravel 11.x compat. --- .github/workflows/ci.yml | 4 +++- composer.json | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f88342b..4b2c8f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,11 @@ jobs: fail-fast: false matrix: php: [8.1] - laravel: [10.*, 9.*] + laravel: [11.*, 10.*, 9.*] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 11.* + testbench: 9.* - laravel: 10.* testbench: 8.* - laravel: 9.* diff --git a/composer.json b/composer.json index 44ed4b7..bdba96d 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,14 @@ ], "require": { "php": "^8.1", - "guzzlehttp/guzzle": "^7.2", - "illuminate/support": "^9.0|^10.0", + "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.9.5", - "orchestra/testbench": "^7.0|^8.0", - "phpunit/phpunit": "^9.5.8" + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.5.21" }, "autoload": { "psr-4": { From f67e718afe44da8749d5b38152cde1a8f8fc8c51 Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 11:16:25 +0200 Subject: [PATCH 04/11] updated ci --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b2c8f5..4bca6b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,9 @@ jobs: strategy: fail-fast: false matrix: - php: [8.1] + php: [8.1, 8.2] laravel: [11.*, 10.*, 9.*] - dependency-version: [prefer-lowest, prefer-stable] + dependency-version: [prefer-stable] include: - laravel: 11.* testbench: 9.* @@ -44,7 +44,7 @@ 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 - name: Uploading code coverage to scrutinize From 3d6339edbc403778ca95d7cdf0e5c1b65006063c Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 11:18:31 +0200 Subject: [PATCH 05/11] updated phpunit dep. for l11 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bdba96d..49c301f 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.9.5", "orchestra/testbench": "^7.0|^8.0|^9.0", - "phpunit/phpunit": "^9.5.21" + "phpunit/phpunit": "^9.5.21|^10.5" }, "autoload": { "psr-4": { From 34ce56361f30bb2ce67b12bfdb891f5ba4f6ec67 Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 11:25:03 +0200 Subject: [PATCH 06/11] updated ci --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bca6b5..fc240ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,9 @@ jobs: 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 @@ -46,7 +49,7 @@ jobs: composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update 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: From 10e5c444e43d16061fa577bfba78d5fcb29ba6ef Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 11:36:58 +0200 Subject: [PATCH 07/11] Release-As: 0.4.0 From 48c80a0c23a9e91abb32bc6943c8c8d8d1fa6bf0 Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 11:44:30 +0200 Subject: [PATCH 08/11] updated readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 65a796b..8f0f8a0 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ This package provides a convenient wrapper to the [Open Food Facts API](https:// ## Requirements -- PHP 8.0+ -- Laravel 9.x +- PHP 8.1+ +- Laravel 9.x, 10.x, 11.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).* +*Legacy support (PHP 7.2+ on Laravel 5.7-8.x + PHP8.0 on Laravel 9.x) at [v0.2.x](https://github.com/openfoodfacts/openfoodfacts-laravel/tree/v0.2.2).* ## Installation From e82f5a7ef866ef9415cbeb21513c6e54ee70b2aa Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 11:44:54 +0200 Subject: [PATCH 09/11] --amend --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f0f8a0..d9ef612 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This package provides a convenient wrapper to the [Open Food Facts API](https:// - PHP 8.1+ - Laravel 9.x, 10.x, 11.x -*Legacy support (PHP 7.2+ on Laravel 5.7-8.x + PHP8.0 on Laravel 9.x) at [v0.2.x](https://github.com/openfoodfacts/openfoodfacts-laravel/tree/v0.2.2).* +*Legacy support (PHP 7.2+ on Laravel 5.7-8.x + PHP 8.0 on Laravel 9.x) at [v0.2.x](https://github.com/openfoodfacts/openfoodfacts-laravel/tree/v0.2.2).* ## Installation From 3f807af15c6fae14cb5329a794c739096bd179e0 Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 11:48:24 +0200 Subject: [PATCH 10/11] updated scrutinizer config --- .scrutinizer.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: From 3127f077be7f380f623e96ddc1480597dea52a2f Mon Sep 17 00:00:00 2001 From: Eddie Palmans Date: Wed, 1 May 2024 12:23:51 +0200 Subject: [PATCH 11/11] updated legacy support info --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d9ef612..14b9bfb 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,6 @@ This package provides a convenient wrapper to the [Open Food Facts API](https:// - PHP 8.1+ - Laravel 9.x, 10.x, 11.x -*Legacy support (PHP 7.2+ on Laravel 5.7-8.x + PHP 8.0 on Laravel 9.x) at [v0.2.x](https://github.com/openfoodfacts/openfoodfacts-laravel/tree/v0.2.2).* - ## Installation You can install the package via composer: @@ -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