Skip to content

Fix PHP 8.4 implicit nullable deprecation warnings#36

Open
SimonBarrettACT wants to merge 4 commits intoanystack-sh:mainfrom
SimonBarrettACT:fix/php84-deprecation-warnings
Open

Fix PHP 8.4 implicit nullable deprecation warnings#36
SimonBarrettACT wants to merge 4 commits intoanystack-sh:mainfrom
SimonBarrettACT:fix/php84-deprecation-warnings

Conversation

@SimonBarrettACT
Copy link

@SimonBarrettACT SimonBarrettACT commented Mar 8, 2026

Summary

  • Upgrade laravel-zero/framework from ^9.2 to ^12.0 (Illuminate v12.53.0) to resolve all PHP 8.4 implicit nullable deprecation warnings
  • Bump pestphp/pest from ^1.21.3 to ^3.0 (PHPUnit 11)
  • Bump nunomaduro/termwind from ^1.14 to ^2.0
  • Bump mockery/mockery from ^1.4.4 to ^1.6
  • Bump symfony/yaml from ^6.2 to ^7.0
  • Bump minimum PHP version from ^8.1 to ^8.2 (required by laravel-zero v12)
  • Migrate phpunit.xml.dist from PHPUnit 9 to PHPUnit 11 schema
  • Replace broken inspire command test with list command test
  • Ran php-cs-fixer with nullable_type_declaration_for_default_null_value rule against app/ — no application code changes needed

Fixes #35

Test plan

  • php porter shows no deprecation warnings on PHP 8.4
  • php porter status works correctly
  • vendor/bin/pest passes with no deprecation warnings

🤖 Generated with Claude Code

…ings

Upgrade laravel-zero/framework from ^9.2 to ^10.0 and bump related
dependencies (pest ^2.0, termwind ^1.15, symfony/yaml ^6.2|^7.0) to
resolve implicit nullable parameter deprecation warnings on PHP 8.4.

Fixes anystack-sh#35

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SimonBarrettACT
Copy link
Author

SimonBarrettACT commented Mar 8, 2026

Using this branch before it's merged

Since the pre-built builds/porter phar has old dependencies baked in, you'll need to run from source to get the fix.

Clone and alias

git clone -b fix/php84-deprecation-warnings https://github.com/SimonBarrettACT/porter.git ~/porter-fix
cd ~/porter-fix && composer install
alias porter="php ~/porter-fix/porter"

Add the alias to your ~/.zshrc or ~/.bashrc to persist it:

echo 'alias porter="php ~/porter-fix/porter"' >> ~/.zshrc

Verify

porter status

You should see clean output with no Deprecated: Implicitly marking parameter... warnings on PHP 8.4.

SimonBarrettACT and others added 3 commits March 8, 2026 14:28
- Migrate phpunit.xml.dist to PHPUnit 10 schema (remove deprecated
  attributes: convertErrorsToExceptions, convertNoticesToExceptions,
  convertWarningsToExceptions, backupStaticAttributes; replace
  coverage with source element)
- Replace inspire command test with list command test since the
  inspire command is not registered in this application

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add vendor patch for laravel-zero/foundation InteractsWithContainer
  (mock, partialMock, spy methods) to fix implicit nullable deprecation
  warnings on PHP 8.4
- Add composer post-install/post-update scripts to apply patch
  automatically
- Rename InspireCommandTest to ListCommandTest and replace broken
  inspire test with list command test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full dependency upgrade to eliminate all PHP 8.4 implicit nullable
deprecation warnings without needing vendor patches:

- laravel-zero/framework: ^10.0 -> ^12.0 (illuminate v12.53.0)
- pestphp/pest: ^2.0 -> ^3.0 (with PHPUnit 11)
- nunomaduro/termwind: ^1.15 -> ^2.0
- mockery/mockery: ^1.4.4 -> ^1.6
- symfony/yaml: ^6.2|^7.0 -> ^7.0
- php: ^8.1 -> ^8.2 (required by laravel-zero v12)

Removes the vendor patch for laravel-zero/foundation as v12 includes
the nullable type fixes natively.

Fixes anystack-sh#35

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

PHP8.4 Depracted warnings Implicitly marking parameter $xxx as nullable is deprecated

1 participant