Skip to content

chore: support PHP 8.3 & 8.4#2

Merged
agissept merged 6 commits into
masterfrom
chore/php84-upgrade
Jul 8, 2026
Merged

chore: support PHP 8.3 & 8.4#2
agissept merged 6 commits into
masterfrom
chore/php84-upgrade

Conversation

@agissept

@agissept agissept commented Jul 8, 2026

Copy link
Copy Markdown
Member

Tujuan

Menjadikan package ini jalan di PHP 8.3 dan 8.4 (framework L42x laravel/framework 4.2.83).

Perubahan

1. Hapus dependency anlutro/l4-testing (436f6f8)

  • Inline logika bootstrap app (createApplication) yang tadinya disediakan PkgAppTestCase langsung ke tests/TestCase.php, extending Illuminate\Foundation\Testing\TestCase bawaan framework.
  • Melepas constraint monolog ~1.1 yang tak terpakai dari l4-testing — inilah yang mengunci laravel/framework di 4.2.77. Dengan lepas, resolver naik ke 4.2.83 yang sudah support PHP 8.4.

2. CI: bump actions ke v4 + matrix 8.3/8.4 (9c02ed9)

  • actions/cache@v1 (auto-failed, deprecated) dan actions/checkout@v1@v4.
  • php-version tunggal → matrix [8.3, 8.4] (fail-fast: false), cache key di-scope per versi.

3. Rector dengan rule eksplisit 8.3/8.4 (48d6647)

  • Pasang rector/rector + rector.php memakai daftar rule eksplisit (bukan level set).
  • ExplicitNullableParamTypeRector menulis ulang Type $x = null?Type $x = null (deprecation implicit-nullable yang hard-deprecated di 8.4, sah di 8.3). Plus #[\Override].
  • Level set sengaja dihindari: UP_TO_PHP_84 menghapus kurung pada new X()->method() — syntax 8.4-only yang gagal parse di 8.3.

4. Sinkronkan skeleton test (L42x-app) (b39b18d, 847fd09)

  • L42x 4.2.83 membuang komponen Illuminate\Remote, tapi skeleton L42x-app masih mendaftarkan RemoteServiceProvider di config/app.php → boot app di test gagal.
  • Fix di-merge ke L42x-app master; laravel/laravel tetap dev-master.

Verifikasi

  • laravel/framework 4.2.83
  • vendor/bin/phpunit67 tests, 106 assertions, hijau di PHP 8.3 & 8.4

🤖 Generated with Claude Code

agissept and others added 4 commits July 6, 2026 17:16
Inline the app-bootstrap logic (createApplication) that l4-testing's
PkgAppTestCase provided directly into tests/TestCase.php, extending the
framework's Illuminate\Foundation\Testing\TestCase instead.

Dropping the package also removes its unused monolog ~1.1 constraint,
which had been pinning laravel/framework to 4.2.77.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
actions/cache@v1 was auto-failing (deprecated); bump it and
actions/checkout to v4. Replace the single php-version with a
[8.3, 8.4] matrix (fail-fast off) so both target versions are tested,
and scope the composer cache key per php version.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add rector/rector with an explicit rule list (not level sets) so the
migration stays compatible with both PHP 8.3 and 8.4. Key rule
ExplicitNullableParamTypeRector rewrites `Type $x = null` to
`?Type $x = null`, fixing the implicit-nullable deprecation that is
hard-deprecated on 8.4 (and valid on 8.3). Also adds #[\Override]
attributes.

Level sets were avoided on purpose: UP_TO_PHP_84 stripped the
parentheses off `new X()->method()`, which is 8.4-only syntax and
fails to parse on 8.3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@agissept agissept force-pushed the chore/php84-upgrade branch from b282883 to 48d6647 Compare July 8, 2026 04:07
agissept and others added 2 commits July 8, 2026 11:35
L42x framework 4.2.83 dropped the Illuminate\Remote component, but the
L42x-app skeleton's config/app.php still registered RemoteServiceProvider,
breaking app boot in the test suite. Track the L42x-app branch that
removes that stale provider so CI can boot cleanly on 8.3 and 8.4.

Revert to dev-master once that branch is merged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The remove-remote-service-provider fix is merged into L42x-app master,
so point back at dev-master instead of the temporary fix branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@agissept agissept changed the title chore: support PHP 8.4 chore: support PHP 8.3 & 8.4 Jul 8, 2026
@agissept agissept merged commit 53be829 into master Jul 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant