Skip to content

Support PHP 8.4 and 8.5 - #89

Merged
AydinHassan merged 6 commits into
masterfrom
php-8.4-8.5
Oct 22, 2026
Merged

AydinHassan merged 6 commits into
masterfrom
php-8.4-8.5

Conversation

@AydinHassan

@AydinHassan AydinHassan commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Running the published phar on PHP 8.5 prints deprecations (E_STRICT in bundled composer, curl_close(), implicitly nullable params in bundled symfony/string). This fixes them.

Code

  • Removed curl_close() (deprecated in 8.5) and made implicitly nullable params explicit in src/ and test/. Also removed setAccessible() (deprecated in 8.5) from a test.
  • Dropped mnapoli/silly-php-di: it has no release without the nullable-param deprecation and calls buildDevContainer(), which php-di 7 removed. Application now extends Silly\Application and calls useContainer() itself.
  • Fixed two PHPStan errors that the newer dependencies exposed (InstallResult, RecordingOutput).

Dependencies

  • php ^8.2 (was ^7.2|^8.0), with config.platform.php set to 8.2.0 so the lock and the phar resolve for 8.2+.
  • composer/composer ^2.10 (locked 2.10.3). Composer up to 2.9.x throws "Your github oauth token for github.com contains invalid characters" for GitHub's newer token format (for example GITHUB_TOKEN / COMPOSER_AUTH in Actions). 2.10.0 removed that check, so 2.10 is the floor, symfony/* ^6.4 | ^7.0 (locked 7.4), php-di/php-di ^7.0, php-http/guzzle7-adapter ^1.1.
  • Replaced padraic/phar-updater (abandoned, needs PHP 7) with the drop-in fork laravel-zero/phar-updater ^1.4. It uses the same Humbug\SelfUpdate namespace.
  • VerifyInstall now says PHP 8.2 is the minimum.

Please review: advisory blocking. Composer 2.9+ refuses to resolve packages that have security advisories. Every 2.8.x release has advisories too, so staying on 2.8 isn't an option. Because of this, installing a tagged workshop (install learnyouphp, which resolves 0.6.1 → league/commonmark 1.x) failed. ComposerInstaller now sets policy.advisories.block = false for workshop installs. That matches what the current phar does. Advisories are still reported. If you'd rather keep blocking, drop that line, but tagged workshops will stop installing until their dependencies are updated.

Phar build

  • Box 2.7.2 crashes on modern PHP, so the phar is now built with box 4.7.0 (box.phar compile). vendor/symfony/console/Resources is added to the phar because Symfony 7's completion command reads it at runtime.
  • In CI, the "Build phar" step (bin/deploy.sh, which pushes to gh-pages) now runs on the 8.4 job instead of 7.2. Coverage moved to 8.4 as well.
  • Dockerfile base is now php:8-cli.

CI: matrix is now 8.2–8.5, the job has timeout-minutes: 15, phpunit runs with --stop-on-error, and checkout is v4.

Republish needed: yes. https://php-school.github.io/workshop-manager/workshop-manager.phar is still the old build. Merging to master runs bin/deploy.sh and pushes a rebuilt phar to gh-pages. Nothing has been published from this branch.

Tested locally

  • phpunit (155 tests), phpstan level max and phpcs PSR12 all pass on 8.5 (host) and on 8.2, 8.3 and 8.4 (Docker), with no deprecations.
  • Built the phar with box 4.7.0. With a temp HOME on PHP 8.5 and error_reporting=-1, install learnyouphp, uninstall, install learnyouphp master and installed all work with no deprecation output. The phar also runs clean on 8.2.

@AydinHassan
AydinHassan merged commit 7fb7dcc into master Oct 22, 2026
4 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