From fce634ff5ea33cdfd94e5666538c6415508cbb8b Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 17 Feb 2025 13:02:41 +0100 Subject: [PATCH 01/12] feat: laravel 12 compatibility --- .github/workflows/run-tests.yml | 8 +++++++- composer.json | 12 ++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 107761bf..f1d7bdf6 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,9 +14,15 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] php: [8.3, 8.2, 8.1] - laravel: [11.*, 10.*] + laravel: [12.*, 11.*, 10.*] stability: [prefer-lowest, prefer-stable] include: + - laravel: 12.* + testbench: 10.* + carbon: ^3.2 + laravel-package-tools: ^1.16.4 + collision: ^8.1.1 + - laravel: 11.* testbench: 9.* carbon: ^3.2 diff --git a/composer.json b/composer.json index 850270b9..273bd2c3 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ ], "require": { "php": "^8.1", - "illuminate/contracts": "^10.0|^11.0", + "illuminate/contracts": "^10.0|^11.0|^12.0", "spatie/laravel-package-tools": "^1.16.4", "symfony/finder": "^6.2|^7.0" }, @@ -40,11 +40,11 @@ "guzzlehttp/guzzle": "^7.0", "larastan/larastan": "^2.0|^3.0", "laravel/pint": "^1.0", - "nunomaduro/collision": "^7.9", - "orchestra/testbench": "^8.0", - "pestphp/pest": "^2.0", - "pestphp/pest-plugin-arch": "^2.0", - "pestphp/pest-plugin-laravel": "^2.0", + "nunomaduro/collision": "^7.9|^8.0", + "orchestra/testbench": "^8.0|^9.0|^10.0", + "pestphp/pest": "^2.0|^3.0", + "pestphp/pest-plugin-arch": "^2.0|^3.0", + "pestphp/pest-plugin-laravel": "^2.0|^3.1", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", From 500f31f023cf53f1b588d5da7d4ff1e00e71f98d Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 17 Feb 2025 13:06:15 +0100 Subject: [PATCH 02/12] fix: add exclusion for Laravel 12 with PHP 8.1 in test matrix --- .github/workflows/run-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f1d7bdf6..621c9b69 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -38,6 +38,8 @@ jobs: exclude: - laravel: 11.* php: 8.1 + - laravel: 12.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} From 8f2bdf97e12d8f30401602b65fa24733ee369a43 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 13:47:07 +0100 Subject: [PATCH 03/12] fix: we don't need larastan on this project --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 273bd2c3..a171ef47 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,6 @@ }, "require-dev": { "guzzlehttp/guzzle": "^7.0", - "larastan/larastan": "^2.0|^3.0", "laravel/pint": "^1.0", "nunomaduro/collision": "^7.9|^8.0", "orchestra/testbench": "^8.0|^9.0|^10.0", @@ -46,6 +45,7 @@ "pestphp/pest-plugin-arch": "^2.0|^3.0", "pestphp/pest-plugin-laravel": "^2.0|^3.1", "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.12", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "spatie/laravel-ray": "^1.26" From 22daf14164dd5b1b67bd14cc97fad37665d59aa5 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 13:49:52 +0100 Subject: [PATCH 04/12] fix: sorry we do, let's try with 3.0-dev --- composer.json | 2 +- phpstan.neon | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index a171ef47..22a9bd02 100644 --- a/composer.json +++ b/composer.json @@ -39,13 +39,13 @@ "require-dev": { "guzzlehttp/guzzle": "^7.0", "laravel/pint": "^1.0", + "larastan/larastan": "^2.0|^3.0-dev", "nunomaduro/collision": "^7.9|^8.0", "orchestra/testbench": "^8.0|^9.0|^10.0", "pestphp/pest": "^2.0|^3.0", "pestphp/pest-plugin-arch": "^2.0|^3.0", "pestphp/pest-plugin-laravel": "^2.0|^3.1", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.12", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "spatie/laravel-ray": "^1.26" diff --git a/phpstan.neon b/phpstan.neon index 33be1e3a..9364a61c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -13,6 +13,6 @@ parameters: - '#Class App\\Providers\\NativeAppServiceProvider not found#' - '#Class Native\\Laravel\\ChildProcess has an uninitialized readonly property#' -# -# excludePaths: -# - ./*/*/FileToBeExcluded.php + + excludePaths: + - ./src/NativeServiceProvider.php From 77d84e33c99f6270101188998e906dc15219bb1c Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 14:20:15 +0100 Subject: [PATCH 05/12] wip: simplifying test suits --- .github/workflows/run-tests.yml | 22 ++-------------------- composer.json | 4 ++-- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 621c9b69..6b4f5023 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,30 +10,12 @@ jobs: test: runs-on: ${{ matrix.os }} strategy: - fail-fast: true + fail-fast: false matrix: os: [ubuntu-latest, windows-latest] php: [8.3, 8.2, 8.1] laravel: [12.*, 11.*, 10.*] stability: [prefer-lowest, prefer-stable] - include: - - laravel: 12.* - testbench: 10.* - carbon: ^3.2 - laravel-package-tools: ^1.16.4 - collision: ^8.1.1 - - - laravel: 11.* - testbench: 9.* - carbon: ^3.2 - laravel-package-tools: ^1.16.4 - collision: ^8.1.1 - - - laravel: 10.* - testbench: 8.* - carbon: ^2.63 - laravel-package-tools: ^1.16.4 - collision: 7.* exclude: - laravel: 11.* @@ -61,7 +43,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" "spatie/laravel-package-tools:${{ matrix.laravel-package-tools }}" "nunomaduro/collision:${{ matrix.collision }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: List Installed Dependencies diff --git a/composer.json b/composer.json index 22a9bd02..921036fb 100644 --- a/composer.json +++ b/composer.json @@ -39,8 +39,8 @@ "require-dev": { "guzzlehttp/guzzle": "^7.0", "laravel/pint": "^1.0", - "larastan/larastan": "^2.0|^3.0-dev", - "nunomaduro/collision": "^7.9|^8.0", + "larastan/larastan": "^2.0|^3.0@dev", + "nunomaduro/collision": "^7.9|^8.1.1", "orchestra/testbench": "^8.0|^9.0|^10.0", "pestphp/pest": "^2.0|^3.0", "pestphp/pest-plugin-arch": "^2.0|^3.0", From a2def9eb039943861e58bae402d46bd3a2219c3c Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 14:28:07 +0100 Subject: [PATCH 06/12] wip: nunomaduro/collision ^7.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 921036fb..29e9c835 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "guzzlehttp/guzzle": "^7.0", "laravel/pint": "^1.0", "larastan/larastan": "^2.0|^3.0@dev", - "nunomaduro/collision": "^7.9|^8.1.1", + "nunomaduro/collision": "^7.11|^8.1.1", "orchestra/testbench": "^8.0|^9.0|^10.0", "pestphp/pest": "^2.0|^3.0", "pestphp/pest-plugin-arch": "^2.0|^3.0", From 0b573f8f4a8d5329bac61d0133dce717a21c74e0 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 14:36:56 +0100 Subject: [PATCH 07/12] wip: 8.4 and show every deps --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6b4f5023..f70490e2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - php: [8.3, 8.2, 8.1] + php: [8.4, 8.3, 8.2, 8.1] laravel: [12.*, 11.*, 10.*] stability: [prefer-lowest, prefer-stable] @@ -47,7 +47,7 @@ jobs: composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: List Installed Dependencies - run: composer show -D + run: composer show - name: Execute tests run: vendor/bin/pest From 7bd1f6c33573a2f564657290a628bb558a657ce5 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 14:40:59 +0100 Subject: [PATCH 08/12] wip: debug phpunit version --- .github/workflows/run-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f70490e2..71a9d7b1 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -49,5 +49,8 @@ jobs: - name: List Installed Dependencies run: composer show + - name: Debug PhpUnit version + run: composer why phpunit/phpunit -t + - name: Execute tests run: vendor/bin/pest From 1fda96e98d9ad367a9720740ce60ac6d593e4d70 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 14:51:11 +0100 Subject: [PATCH 09/12] wip: fixing L10 prefer-lowest 8.1 and 8.2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 29e9c835..58cdc537 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "larastan/larastan": "^2.0|^3.0@dev", "nunomaduro/collision": "^7.11|^8.1.1", "orchestra/testbench": "^8.0|^9.0|^10.0", - "pestphp/pest": "^2.0|^3.0", + "pestphp/pest": "^v2.30|^3.0", "pestphp/pest-plugin-arch": "^2.0|^3.0", "pestphp/pest-plugin-laravel": "^2.0|^3.1", "phpstan/extension-installer": "^1.1", From c50706973ce9a2786922074521bc3c6fbe9f5646 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 15:38:41 +0100 Subject: [PATCH 10/12] wip: fixing phpstan dependencies --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 58cdc537..f13f2446 100644 --- a/composer.json +++ b/composer.json @@ -46,8 +46,8 @@ "pestphp/pest-plugin-arch": "^2.0|^3.0", "pestphp/pest-plugin-laravel": "^2.0|^3.1", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-deprecation-rules": "^1.0|^2.0", + "phpstan/phpstan-phpunit": "^1.0|^2.0", "spatie/laravel-ray": "^1.26" }, "autoload": { From 9b1601e3cb16663fb6648a56244502f7340d774c Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 16:11:18 +0100 Subject: [PATCH 11/12] fix: new phpstan rules so I deleted an unused class --- composer.json | 2 +- phpstan.neon | 3 ++ src/Commands/LoadPHPConfigurationCommand.php | 2 ++ src/Concerns/InteractsWithNativeApp.php | 34 -------------------- 4 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 src/Concerns/InteractsWithNativeApp.php diff --git a/composer.json b/composer.json index f13f2446..71336edd 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "require-dev": { "guzzlehttp/guzzle": "^7.0", "laravel/pint": "^1.0", - "larastan/larastan": "^2.0|^3.0@dev", + "larastan/larastan": "^2.0|^3.1", "nunomaduro/collision": "^7.11|^8.1.1", "orchestra/testbench": "^8.0|^9.0|^10.0", "pestphp/pest": "^v2.30|^3.0", diff --git a/phpstan.neon b/phpstan.neon index 9364a61c..b6543b0b 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -9,6 +9,9 @@ parameters: # Level 9 is the highest level level: 5 + + noEnvCallsOutsideOfConfig: false # Don't know why he doesn't consider our config/ directory as config + ignoreErrors: - '#Class App\\Providers\\NativeAppServiceProvider not found#' - '#Class Native\\Laravel\\ChildProcess has an uninitialized readonly property#' diff --git a/src/Commands/LoadPHPConfigurationCommand.php b/src/Commands/LoadPHPConfigurationCommand.php index b3b7a714..1a2ba579 100644 --- a/src/Commands/LoadPHPConfigurationCommand.php +++ b/src/Commands/LoadPHPConfigurationCommand.php @@ -14,6 +14,8 @@ public function handle() /** @var ProvidesPhpIni $provider */ $provider = app(config('nativephp.provider')); $phpIni = []; + + /* * @phpstan-ignore-next-line */ if (method_exists($provider, 'phpIni')) { $phpIni = $provider->phpIni(); } diff --git a/src/Concerns/InteractsWithNativeApp.php b/src/Concerns/InteractsWithNativeApp.php deleted file mode 100644 index 7dd6ee78..00000000 --- a/src/Concerns/InteractsWithNativeApp.php +++ /dev/null @@ -1,34 +0,0 @@ -start(); - - if (is_iterable($totalSteps)) { - foreach ($totalSteps as $value) { - $callback($value, $bar); - - $bar->advance(); - } - } else { - $callback($bar); - } - - $bar->finish(); - - if (is_iterable($totalSteps)) { - return $totalSteps; - } - } -} From af17bc242674af4440d1a870030b1716bd11756e Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 24 Feb 2025 16:19:19 +0100 Subject: [PATCH 12/12] fix: remove debug --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 71a9d7b1..a1909f62 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -49,8 +49,8 @@ jobs: - name: List Installed Dependencies run: composer show - - name: Debug PhpUnit version - run: composer why phpunit/phpunit -t +# - name: Debug PhpUnit version +# run: composer why phpunit/phpunit -t - name: Execute tests run: vendor/bin/pest