Fix PHP 8.6 deprecation in hoa/consistency - #6405
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
|
Thank you! |
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 free
to 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.
Running PHPStan on PHP 8.6 prints 24 deprecations before it does anything:
All 24 come from that one line.
Prelude.phpis in composer'sautoload.files, so it runs on everyvendor/autoload.phpinclude, andhoa/consistencyarrives throughhoa/compilerinrequire.Dropping the third argument changes nothing. All 27
$define()call sites pass two arguments, so$caseis always
false. I parsed them with a brace-aware scan rather than a grep, because one call spans threelines.
Measured on
8.6.0beta2, through a realcomposer installso the patch goes throughcweagans/composer-patches:Same three-file shape as d36a97f and 44deb6b, the two 8.5 deprecation fixes. The constants come out
identical afterwards:
SUCCEED,FAILED,WITH_COMPOSER,DSandPSall keep their values.This is one piece of PHP 8.6 support, and it stands on its own. It is the Hoa problem you expected in
point 3.