Uh oh!
There was an error while loading. Please reload this page.
fix: Update dependencies for PHP 8.4 compatibility. - #45
Merged
Conversation
Running the phar on PHP 8.4 printed "Implicitly marking parameter $x as nullable is deprecated" notices from vendored consolidation packages, which surface as ERROR lines in deploy logs. - composer update: consolidation/annotated-command 4.10.0 -> 4.10.5, consolidation/config 3.0.0 -> 3.2.1, grasmash/expander 3.0.0 -> 3.0.1 and the remaining consolidation/symfony dependencies along with them. - Declare the $previous exception parameter explicitly nullable in PhappEnvironmentUndefinedException and PhappInstanceNotFoundException. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ouHkvipwQik1mwsrrBmUd
composer.lockPackage changes
Dev Package changes
Important Metadata Changes
Settings · Docs · Powered by Private Packagist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#43.
Problem
Running the released phar on PHP 8.4 prints implicit-nullable deprecations from the vendored
consolidation/*packages. Because Lagoon's deploy log treats anything on stderr as an error, these show up asERRORlines in deploy output:What changed
composer update(no constraint changes needed —composer.jsonwas already permissive enough):The three bold ones are the packages that actually carried implicit-nullable signatures.
annotated-commandgoes to 4.10.5 rather than the 4.10.1 named in the issue, since that is the current 4.x release and it contains the same fix.src/fixes — phapp-cli had two implicit-nullable signatures of its own, which would have started printing the same deprecation from within the phar:in
PhappEnvironmentUndefinedExceptionandPhappInstanceNotFoundException.?Typeneeds PHP 7.1, well below the declaredphp: >=7.4, so no constraint change is required.Verification
Verified:
php:8.4-cliimage) againstmaster's lockfile —php ./phapp listprintedConsolidation\Config\Config::__construct(): Implicitly marking parameter $data as nullable is deprecated../phapp list,./phapp help buildand./phapp statusall run witherror_reporting=E_ALL, display_errors=1and print zero deprecations.composer build(box 4.6.1) and ran./phapp.phar list/help build/statuson PHP 8.4 — also clean.token_get_all()-based scanner for typed non-nullable parameters defaulting tonull:masterhad 5 real hits (consolidation/config×1,consolidation/annotated-command×2 — including the exactStateHelper.php:32from the issue — andgrasmash/expander×2), plus the 2 insrc/. After this change: 0 insrc/and 0 in the runtime vendor tree.composer validate→ valid;php -lclean oversrc/andphapp.Not verified / caveats:
phpstan analyse src --level=0reports 2 errors insrc/ScriptHandler.php(Composer\Script\Event/Composer\Util\StreamContextFactorynot found —composer/composeris not a dependency). These are pre-existing onmasterand untouched by this PR; there is nophpstan.neonin the repo, so PHPStan is not wired into any CI.phapp.ymlwere exercised (list,help,status). Thebuild/install/clone/createpaths were not run against a real project, so the Symfony minor bumps (console 6.4.15 → 6.4.45, process/dotenv/finder 7.1 → 7.4) are unverified against real-world usage. All stay within the same major, and Symfony 6.4/7.4 are the current LTS lines.symfony/consoleresolves to 6.4 rather than 7.x becauseconsolidation/robo5.1.1 caps it there — unchanged behaviour from before.Note for consumers — a release is needed
Projects consume the released phar, not this repo, so nothing changes for them until a new release is cut: tag 0.7.3, run
composer build, and uploadphapp.pharto the GitHub release page (see README → "Create a new release"). Until then, Lagoon deploy logs will keep showing theERROR:lines from 0.7.2. I have deliberately not created a release or tag here.Follow-up:
composer builditself turned out to be broken (box symlink left pointing at box 2.7.5 on pre-Dec-2024 checkouts, and box 4.6.1 does not run on PHP 8.4). Fixed separately in #46, which is required before a 0.7.3 phar can actually be built on PHP 8.4.🤖 Generated with Claude Code
https://claude.ai/code/session_018ouHkvipwQik1mwsrrBmUd