From 4b8c3aea82d5c728fd1d5fde3a92fecdc0b514a1 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:48:00 +0200 Subject: [PATCH 01/11] Use ramsey/composer-install@v2 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f6809f..d8c8aa4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: run: composer remove --no-update ${{ matrix.remove-dependencies }} - name: "Install dependencies" - uses: ramsey/composer-install@1.3.0 + uses: ramsey/composer-install@v2 with: dependency-versions: ${{ matrix.dependencies }} env: @@ -75,7 +75,7 @@ jobs: php-version: "8.0" - name: "Install dependencies" - uses: ramsey/composer-install@1.3.0 + uses: ramsey/composer-install@v2 - name: "Check coding standard" run: composer check-cs From 5bfba32618d55980752c994fb3636fdbb4eea641 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:48:40 +0200 Subject: [PATCH 02/11] Drop PHP 8.0 and start testing PHP 8.2 --- .github/workflows/ci.yml | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8c8aa4..d28667e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,8 @@ jobs: fail-fast: false matrix: php-version: - - '8.0' - '8.1' + - '8.2' symfony-version: - '5.3.*' - '5.4.*' @@ -72,7 +72,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: tools: flex - php-version: "8.0" + php-version: "8.2" - name: "Install dependencies" uses: ramsey/composer-install@v2 diff --git a/composer.json b/composer.json index db56535..8e83a26 100644 --- a/composer.json +++ b/composer.json @@ -25,9 +25,9 @@ "sort-packages": true }, "require": { - "php": "^8.0", "overblog/dataloader-php": "^0.7.0", "symfony/dependency-injection": "^5.3.7 || ^6.0" + "php": "^8.1", }, "require-dev": { "phpunit/phpunit": "^9.5.10", From 21af3c76ff297c49438f070d7946f253711ae8b1 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:48:54 +0200 Subject: [PATCH 03/11] Require overblog/dataloader-php v1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8e83a26..2c842c3 100644 --- a/composer.json +++ b/composer.json @@ -25,9 +25,9 @@ "sort-packages": true }, "require": { - "overblog/dataloader-php": "^0.7.0", "symfony/dependency-injection": "^5.3.7 || ^6.0" "php": "^8.1", + "overblog/dataloader-php": "^1", }, "require-dev": { "phpunit/phpunit": "^9.5.10", From a1bf4a131504c25b19bb22cf78c4c50109c3d5d0 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:49:12 +0200 Subject: [PATCH 04/11] Only support Symfony 5.4 and 6.3 --- .github/workflows/ci.yml | 3 +-- composer.json | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d28667e..df1858f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,8 @@ jobs: - '8.1' - '8.2' symfony-version: - - '5.3.*' - '5.4.*' - - '6.0.*' + - '6.3.*' dependencies: - 'lowest' - 'highest' diff --git a/composer.json b/composer.json index 2c842c3..b5af66e 100644 --- a/composer.json +++ b/composer.json @@ -25,16 +25,16 @@ "sort-packages": true }, "require": { - "symfony/dependency-injection": "^5.3.7 || ^6.0" "php": "^8.1", "overblog/dataloader-php": "^1", + "symfony/dependency-injection": "^5.4 || ^6.3" }, "require-dev": { "phpunit/phpunit": "^9.5.10", "react/promise": "^2.8.0", - "sensio/framework-extra-bundle": "^6.2", - "symfony/phpunit-bridge": "^6.0", - "symfony/yaml": "^5.3.7 || ^6.0" + "sensio/framework-extra-bundle": "^6.3", + "symfony/phpunit-bridge": "^6.3", + "symfony/yaml": "^5.4 || ^6.3" }, "extra": { "branch-alias": { From ee82ed339481eb2a35dafcdb57a6a592e7d400f1 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:50:07 +0200 Subject: [PATCH 05/11] Drop sensio/framework-extra-bundle --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index b5af66e..7bc7bae 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,6 @@ "require-dev": { "phpunit/phpunit": "^9.5.10", "react/promise": "^2.8.0", - "sensio/framework-extra-bundle": "^6.3", "symfony/phpunit-bridge": "^6.3", "symfony/yaml": "^5.4 || ^6.3" }, From 76f459edcde03217d6c499f887516b4b6bdeb53e Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:51:54 +0200 Subject: [PATCH 06/11] Require symfony/framework-bundle in dev --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 7bc7bae..60ae20c 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,7 @@ "require-dev": { "phpunit/phpunit": "^9.5.10", "react/promise": "^2.8.0", + "symfony/framework-bundle": "^5.4||^6.3", "symfony/phpunit-bridge": "^6.3", "symfony/yaml": "^5.4 || ^6.3" }, From c9e70522fde240898ce444f2490c0b0ff3c8c224 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:52:04 +0200 Subject: [PATCH 07/11] Upgrade PHPUnit to v10 --- .gitignore | 1 + composer.json | 2 +- phpunit.xml.dist | 32 ++++++++++---------------------- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 8293200..41854a8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ composer.phar .php_cs.cache /*.phar /.phpunit.result.cache +/.phpunit.cache diff --git a/composer.json b/composer.json index 60ae20c..b48b309 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "symfony/dependency-injection": "^5.4 || ^6.3" }, "require-dev": { - "phpunit/phpunit": "^9.5.10", + "phpunit/phpunit": "^10.3", "react/promise": "^2.8.0", "symfony/framework-bundle": "^5.4||^6.3", "symfony/phpunit-bridge": "^6.3", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e34164e..1f8ec7c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,24 +1,12 @@ - - - - - ./tests/ - - - - - - - - + + + + ./tests/ + + + + + + From 778a3d33a369aea7d4e4082686d77ff788188eff Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:52:36 +0200 Subject: [PATCH 08/11] Set http_method_override --- tests/Functional/app/config/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Functional/app/config/config.yaml b/tests/Functional/app/config/config.yaml index f9549d0..d16ec02 100644 --- a/tests/Functional/app/config/config.yaml +++ b/tests/Functional/app/config/config.yaml @@ -6,6 +6,7 @@ framework: resource: "%kernel.project_dir%/config/routing.yaml" profiler: enabled: false + http_method_override: false overblog_dataloader: defaults: From 8ef02280a034590d922cba49e32c56b2c451af61 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Mon, 28 Aug 2023 10:35:48 +0200 Subject: [PATCH 09/11] Bump PHP-CS-Fixer --- .gitignore | 1 + .php_cs => .php-cs-fixer.php | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename .php_cs => .php-cs-fixer.php (94%) diff --git a/.gitignore b/.gitignore index 41854a8..7898efc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ composer.phar /*.phar /.phpunit.result.cache /.phpunit.cache +/.php-cs-fixer.cache diff --git a/.php_cs b/.php-cs-fixer.php similarity index 94% rename from .php_cs rename to .php-cs-fixer.php index b356b58..5ad3365 100644 --- a/.php_cs +++ b/.php-cs-fixer.php @@ -9,7 +9,7 @@ file that was distributed with this source code. EOF; -return PhpCsFixer\Config::create() +return (new PhpCsFixer\Config()) ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, diff --git a/composer.json b/composer.json index b48b309..6657e05 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ }, "scripts": { "test": "bin/phpunit --color=always --coverage-clover=build/logs/clover.xml", - "install-cs": "test -f php-cs-fixer.phar || wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.18.7/php-cs-fixer.phar -O php-cs-fixer.phar", + "install-cs": "test -f php-cs-fixer.phar || wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.23.0/php-cs-fixer.phar -O php-cs-fixer.phar", "fix-cs": [ "@install-cs", "@php php-cs-fixer.phar fix --diff -v --allow-risky=yes --ansi" From 1d64c5be4fe1301b8dc2471820c2b71ca3425ca5 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:55:15 +0200 Subject: [PATCH 10/11] Apply CS fixes --- src/DependencyInjection/Configuration.php | 2 +- tests/Functional/TestCase.php | 6 ------ tests/Functional/UserLoaderTest.php | 1 + tests/Functional/app/AppKernel.php | 6 ------ 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index e32e137..6e6e664 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -57,7 +57,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->end() ->end() ->end() - ; + ; return $treeBuilder; } diff --git a/tests/Functional/TestCase.php b/tests/Functional/TestCase.php index 9ab7c0f..218c2fa 100644 --- a/tests/Functional/TestCase.php +++ b/tests/Functional/TestCase.php @@ -29,9 +29,6 @@ protected static function getKernelClass(): string return AppKernel::class; } - /** - * {@inheritdoc} - */ protected static function createKernel(array $options = []): KernelInterface { if (null === static::$class) { @@ -46,9 +43,6 @@ protected static function createKernel(array $options = []): KernelInterface return new static::$class($env, $debug, $options['test_case']); } - /** - * {@inheritdoc} - */ public static function setUpBeforeClass(): void { $fs = new Filesystem(); diff --git a/tests/Functional/UserLoaderTest.php b/tests/Functional/UserLoaderTest.php index 640e1f2..650ef9e 100644 --- a/tests/Functional/UserLoaderTest.php +++ b/tests/Functional/UserLoaderTest.php @@ -13,6 +13,7 @@ use Overblog\DataLoader\DataLoader; use Overblog\DataLoaderBundle\Tests\Functional\app\UserDataProvider; + use function React\Promise\all; class UserLoaderTest extends TestCase diff --git a/tests/Functional/app/AppKernel.php b/tests/Functional/app/AppKernel.php index 2d1f2ab..e783190 100644 --- a/tests/Functional/app/AppKernel.php +++ b/tests/Functional/app/AppKernel.php @@ -21,9 +21,6 @@ class AppKernel extends Kernel { private $testCase; - /** - * {@inheritdoc} - */ public function registerBundles(): array { return [ @@ -52,9 +49,6 @@ public function isBooted() return $this->booted; } - /** - * {@inheritdoc} - */ public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config.yaml'); From 8e417cbaa7102e0132d295038709f90a8ae34a28 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 25 Aug 2023 14:56:12 +0200 Subject: [PATCH 11/11] Run tests without coverage --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6657e05..134ec91 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ } }, "scripts": { - "test": "bin/phpunit --color=always --coverage-clover=build/logs/clover.xml", + "test": "bin/phpunit --color=always", "install-cs": "test -f php-cs-fixer.phar || wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.23.0/php-cs-fixer.phar -O php-cs-fixer.phar", "fix-cs": [ "@install-cs",