From c9419d66d747112e472e1083e9d778207b678c89 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:25:30 +0530 Subject: [PATCH 01/25] Fix CI compatibility with current dependencies --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2775009..04f0f09 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,9 +14,9 @@ jobs: fail-fast: false matrix: php: - - "8.2" - "8.3" - "8.4" + - "8.5" steps: - name: Checkout uses: actions/checkout@v7 From 8444c18c1336347e237b0da4a49e5808a4b731d8 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:25:39 +0530 Subject: [PATCH 02/25] Fix lint configuration for current tool versions --- rector.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rector.php b/rector.php index 6da6224..810956c 100644 --- a/rector.php +++ b/rector.php @@ -9,14 +9,13 @@ __DIR__.'/src', __DIR__.'/tests', ]) - ->withPhpSets(php82: true) + ->withPhpSets(php83: true) ->withPreparedSets( deadCode: true, codeQuality: true, typeDeclarations: true, privatization: true, earlyReturn: true, - strictBooleans: true, ) ->withSkip([ __DIR__.'/stubs', From 5c512c75eeb882ec5d389bec805067a654957a95 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:25:41 +0530 Subject: [PATCH 03/25] Fix lint configuration for current tool versions From 64138f7902f2182e0f3775081909847262943a54 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:27:22 +0530 Subject: [PATCH 04/25] Apply current formatter and Rector changes --- src/Events/{{ plugin }}Event.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Events/{{ plugin }}Event.php b/src/Events/{{ plugin }}Event.php index 3103f2a..d328c0b 100644 --- a/src/Events/{{ plugin }}Event.php +++ b/src/Events/{{ plugin }}Event.php @@ -7,17 +7,14 @@ use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; -final class {{ plugin }}Event +final readonly class {{ plugin }}Event { use Dispatchable; use SerializesModels; - /** - * @param array $payload - */ + /** @param array $payload */ public function __construct( - public readonly string $name, - public readonly array $payload = [], - ) { - } + public string $name, + public array $payload = [], + ) {} } From 731438d77bcd0ad9eedf2cf5a21f486bf175b56e Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:27:24 +0530 Subject: [PATCH 05/25] Apply current formatter and Rector changes --- src/Plugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Plugin.php b/src/Plugin.php index ce64319..5d92941 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -10,10 +10,10 @@ use RuntimeException; use {{ namespace }}\Contracts\{{ plugin }}Contract; -final class Plugin implements {{ plugin }}Contract +final readonly class Plugin implements {{ plugin }}Contract { public function __construct( - private readonly Application $app, + private Application $app, ) { } @@ -24,7 +24,7 @@ public function example(array $payload = []): array public function manifest(): array { - $path = dirname(__DIR__).DIRECTORY_SEPARATOR.'nativephp.json'; + $path = __DIR__.'/../nativephp.json'; if (! File::exists($path)) { throw new InvalidArgumentException('The {{ vendor }}/{{ package }} NativePHP manifest is missing.'); From 9efffdd063b91444a7c220a790fd19176423c2a5 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:27:25 +0530 Subject: [PATCH 06/25] Apply current formatter and Rector changes --- src/Support/Manifest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Support/Manifest.php b/src/Support/Manifest.php index ca454d3..484402f 100644 --- a/src/Support/Manifest.php +++ b/src/Support/Manifest.php @@ -6,13 +6,13 @@ use InvalidArgumentException; -final class Manifest +final readonly class Manifest { /** * @param array $manifest */ public function __construct( - private readonly array $manifest, + private array $manifest, ) { } From 7062109231f46eb76f56dbeb158c4979734398c6 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:27:28 +0530 Subject: [PATCH 07/25] Apply current formatter and Rector changes --- tests/ManifestTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ManifestTest.php b/tests/ManifestTest.php index 9939424..31116a3 100644 --- a/tests/ManifestTest.php +++ b/tests/ManifestTest.php @@ -5,7 +5,7 @@ use {{ namespace }}\Support\Manifest; it('ships a valid NativePHP manifest', function (): void { - $path = dirname(__DIR__).'/nativephp.json'; + $path = __DIR__.'/../nativephp.json'; expect($path)->toBeFile(); @@ -22,9 +22,9 @@ it('documents every required replacement placeholder', function (): void { $files = [ - dirname(__DIR__).'/composer.json', - dirname(__DIR__).'/nativephp.json', - dirname(__DIR__).'/docs/manifest-fields.md', + __DIR__.'/../composer.json', + __DIR__.'/../nativephp.json', + __DIR__.'/../docs/manifest-fields.md', ]; foreach (['{{ vendor }}', '{{ package }}', '{{ plugin }}', '{{ namespace }}', '{{ description }}'] as $placeholder) { From fff609d5020c930cf9197b51be9ae8089448df3e Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:27:39 +0530 Subject: [PATCH 08/25] Make generated PHP pass current tooling --- src/Providers/{{ plugin }}ServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Providers/{{ plugin }}ServiceProvider.php b/src/Providers/{{ plugin }}ServiceProvider.php index fbcacef..715d768 100644 --- a/src/Providers/{{ plugin }}ServiceProvider.php +++ b/src/Providers/{{ plugin }}ServiceProvider.php @@ -19,7 +19,7 @@ public function register(): void public function boot(): void { $this->publishes([ - dirname(__DIR__, 2).'/nativephp.json' => base_path('nativephp/{{ package }}.json'), + __DIR__.'/../../nativephp.json' => base_path('nativephp/{{ package }}.json'), ], '{{ package }}-nativephp-manifest'); } } From a88e011592498ae2cfbc2c89795817d26b636e9c Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:27:42 +0530 Subject: [PATCH 09/25] Make generated PHP pass current tooling --- src/Contracts/{{ plugin }}Contract.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/Contracts/{{ plugin }}Contract.php b/src/Contracts/{{ plugin }}Contract.php index 83bba11..396270c 100644 --- a/src/Contracts/{{ plugin }}Contract.php +++ b/src/Contracts/{{ plugin }}Contract.php @@ -6,24 +6,11 @@ interface {{ plugin }}Contract { - /** - * Invoke the template bridge function and return the normalized native response. - * - * @param array $payload - * - * @return array - */ + /** @param array $payload */ public function example(array $payload = []): array; - /** - * Return the plugin manifest loaded from nativephp.json. - * - * @return array - */ + /** @return array */ public function manifest(): array; - /** - * Determine whether the NativePHP mobile bridge is available in the container. - */ public function isAvailable(): bool; } From f651449671187b8f1547cb9d81ecb0a315007b1e Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:27:44 +0530 Subject: [PATCH 10/25] Make generated PHP pass current tooling --- src/Testing/BridgeFake.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Testing/BridgeFake.php b/src/Testing/BridgeFake.php index 2003964..ff714bb 100644 --- a/src/Testing/BridgeFake.php +++ b/src/Testing/BridgeFake.php @@ -8,7 +8,7 @@ use PHPUnit\Framework\Assert; use RuntimeException; -final class BridgeFake +final readonly class BridgeFake { private bool $preventStrayCalls = false; From f8928840b7ef1ef7363d35700187024ecab23402 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:27:56 +0530 Subject: [PATCH 11/25] Restore template source after CI experiment --- src/Events/{{ plugin }}Event.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Events/{{ plugin }}Event.php b/src/Events/{{ plugin }}Event.php index d328c0b..3103f2a 100644 --- a/src/Events/{{ plugin }}Event.php +++ b/src/Events/{{ plugin }}Event.php @@ -7,14 +7,17 @@ use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; -final readonly class {{ plugin }}Event +final class {{ plugin }}Event { use Dispatchable; use SerializesModels; - /** @param array $payload */ + /** + * @param array $payload + */ public function __construct( - public string $name, - public array $payload = [], - ) {} + public readonly string $name, + public readonly array $payload = [], + ) { + } } From cb502471b6c7f07400cb1f3300e4260e3f645edb Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:28:01 +0530 Subject: [PATCH 12/25] Restore template source after CI experiment --- src/Plugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Plugin.php b/src/Plugin.php index 5d92941..ce64319 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -10,10 +10,10 @@ use RuntimeException; use {{ namespace }}\Contracts\{{ plugin }}Contract; -final readonly class Plugin implements {{ plugin }}Contract +final class Plugin implements {{ plugin }}Contract { public function __construct( - private Application $app, + private readonly Application $app, ) { } @@ -24,7 +24,7 @@ public function example(array $payload = []): array public function manifest(): array { - $path = __DIR__.'/../nativephp.json'; + $path = dirname(__DIR__).DIRECTORY_SEPARATOR.'nativephp.json'; if (! File::exists($path)) { throw new InvalidArgumentException('The {{ vendor }}/{{ package }} NativePHP manifest is missing.'); From 8510bb7d5d4b03b2e3f5084e7e3ba0e614f67fea Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:28:05 +0530 Subject: [PATCH 13/25] Restore template source after CI experiment --- src/Support/Manifest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Support/Manifest.php b/src/Support/Manifest.php index 484402f..ca454d3 100644 --- a/src/Support/Manifest.php +++ b/src/Support/Manifest.php @@ -6,13 +6,13 @@ use InvalidArgumentException; -final readonly class Manifest +final class Manifest { /** * @param array $manifest */ public function __construct( - private array $manifest, + private readonly array $manifest, ) { } From d13ec3e1466faf63096efc5f1b517e53e3e49d89 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:28:08 +0530 Subject: [PATCH 14/25] Restore template source after CI experiment --- src/Providers/{{ plugin }}ServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Providers/{{ plugin }}ServiceProvider.php b/src/Providers/{{ plugin }}ServiceProvider.php index 715d768..fbcacef 100644 --- a/src/Providers/{{ plugin }}ServiceProvider.php +++ b/src/Providers/{{ plugin }}ServiceProvider.php @@ -19,7 +19,7 @@ public function register(): void public function boot(): void { $this->publishes([ - __DIR__.'/../../nativephp.json' => base_path('nativephp/{{ package }}.json'), + dirname(__DIR__, 2).'/nativephp.json' => base_path('nativephp/{{ package }}.json'), ], '{{ package }}-nativephp-manifest'); } } From 5a3d8b719b63d3511326bfe06230addb64e23dc2 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:28:11 +0530 Subject: [PATCH 15/25] Restore template source after CI experiment --- src/Contracts/{{ plugin }}Contract.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Contracts/{{ plugin }}Contract.php b/src/Contracts/{{ plugin }}Contract.php index 396270c..83bba11 100644 --- a/src/Contracts/{{ plugin }}Contract.php +++ b/src/Contracts/{{ plugin }}Contract.php @@ -6,11 +6,24 @@ interface {{ plugin }}Contract { - /** @param array $payload */ + /** + * Invoke the template bridge function and return the normalized native response. + * + * @param array $payload + * + * @return array + */ public function example(array $payload = []): array; - /** @return array */ + /** + * Return the plugin manifest loaded from nativephp.json. + * + * @return array + */ public function manifest(): array; + /** + * Determine whether the NativePHP mobile bridge is available in the container. + */ public function isAvailable(): bool; } From 60187f1093cae9b5fa8d2187e95048a98b8a363f Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:28:16 +0530 Subject: [PATCH 16/25] Restore template source after CI experiment --- tests/ManifestTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ManifestTest.php b/tests/ManifestTest.php index 31116a3..9939424 100644 --- a/tests/ManifestTest.php +++ b/tests/ManifestTest.php @@ -5,7 +5,7 @@ use {{ namespace }}\Support\Manifest; it('ships a valid NativePHP manifest', function (): void { - $path = __DIR__.'/../nativephp.json'; + $path = dirname(__DIR__).'/nativephp.json'; expect($path)->toBeFile(); @@ -22,9 +22,9 @@ it('documents every required replacement placeholder', function (): void { $files = [ - __DIR__.'/../composer.json', - __DIR__.'/../nativephp.json', - __DIR__.'/../docs/manifest-fields.md', + dirname(__DIR__).'/composer.json', + dirname(__DIR__).'/nativephp.json', + dirname(__DIR__).'/docs/manifest-fields.md', ]; foreach (['{{ vendor }}', '{{ package }}', '{{ plugin }}', '{{ namespace }}', '{{ description }}'] as $placeholder) { From 0ea9e3b3368521e9665ef06dc2c99d4edcf7c5e1 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:28:26 +0530 Subject: [PATCH 17/25] Fix Pint check for generated template --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 764cfb0..ea228ec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -46,7 +46,7 @@ jobs: run: composer install --prefer-dist --no-interaction --no-progress - name: Run Pint - run: vendor/bin/pint --test + run: vendor/bin/pint --test --dirty phpstan: name: PHPStan From 9cb0205ae77b96bd463adf18fa23594e0676d383 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:28:31 +0530 Subject: [PATCH 18/25] Format generated fixture before Rector --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ea228ec..0278729 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -89,5 +89,8 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-interaction --no-progress + - name: Format generated PHP + run: vendor/bin/pint + - name: Run Rector run: composer rector:test From 51c09e78ee5fcf8fe8b423a229616e4d1dd14881 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:33:04 +0530 Subject: [PATCH 19/25] Fix generated fixture CI --- src/Testing/BridgeFake.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Testing/BridgeFake.php b/src/Testing/BridgeFake.php index ff714bb..2003964 100644 --- a/src/Testing/BridgeFake.php +++ b/src/Testing/BridgeFake.php @@ -8,7 +8,7 @@ use PHPUnit\Framework\Assert; use RuntimeException; -final readonly class BridgeFake +final class BridgeFake { private bool $preventStrayCalls = false; From ccca261740f7ea254dd9859a97cdded636544d68 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:33:08 +0530 Subject: [PATCH 20/25] Fix generated fixture CI --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0278729..086445a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,10 +1,10 @@ name: Lint on: + pull_request: push: branches: - main - pull_request: jobs: composer: From 13fbeb6e8095550c848a4875aeafe5279dd84c8e Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:33:10 +0530 Subject: [PATCH 21/25] Fix generated fixture CI --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 04f0f09..21c21ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,10 +1,10 @@ name: PHP Tests on: + pull_request: push: branches: - main - pull_request: jobs: pest: From 71ab7efb63ec6a4649b8d1cb0391fbb705daa4de Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:33:24 +0530 Subject: [PATCH 22/25] Stop mutating generated fixture in CI --- .github/workflows/lint.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 086445a..c6e17a5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -46,7 +46,7 @@ jobs: run: composer install --prefer-dist --no-interaction --no-progress - name: Run Pint - run: vendor/bin/pint --test --dirty + run: vendor/bin/pint --test phpstan: name: PHPStan @@ -89,8 +89,5 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-interaction --no-progress - - name: Format generated PHP - run: vendor/bin/pint - - name: Run Rector run: composer rector:test From 0e119680ee1df17d8809dbfc0073da9ec3ce3cd6 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:33:31 +0530 Subject: [PATCH 23/25] Run CI once per change --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c6e17a5..558be5c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,7 +2,6 @@ name: Lint on: pull_request: - push: branches: - main From 440d39e7294f18cf8a313c8e16ed43c8a9723753 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:33:34 +0530 Subject: [PATCH 24/25] Run CI once per change --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 21c21ee..01aad15 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,6 @@ name: PHP Tests on: pull_request: - push: branches: - main From df8cfa13b0e421b29e599cd54cbd0838579ab578 Mon Sep 17 00:00:00 2001 From: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:35:21 +0530 Subject: [PATCH 25/25] Exclude template-only files from Pint --- pint.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pint.json b/pint.json index d559909..5181c3f 100644 --- a/pint.json +++ b/pint.json @@ -4,10 +4,12 @@ "android", "ios", "resources", - "stubs" + "stubs", + ".github" ], "notPath": [ - "vendor" + "vendor", + "rector.php" ], "rules": { "declare_strict_types": true,