Uh oh!
There was an error while loading. Please reload this page.
[DowngradePhp81] Skip PHP_VERSION_ID guarded hash() calls in DowngradeHashAlgorithmXxHashRector - #394
Merged
Merged
Conversation
…eHashAlgorithmXxHashRector Mark hash() calls inside a PHP_VERSION_ID guarded ternary/if as version conditioned, so they are skipped like version_compare() guarded calls. Drops the dead scope-based check, which no longer resolves to an IntegerRangeType. Claude-Session: https://claude.ai/code/session_01UCwZigZyZFXK9SNVFLQsRi
TomasVotrubaforce-pushed
the
fix-php-version-id-guard-xxhash
branch
from
August 30, 2026 22:30
f7c53af to
198e0e3CompareTomasVotruba
enabled auto-merge (squash)
August 30, 2026 22:30
Uh oh!
There was an error while loading. Please reload this page.
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.
skip_check_phpversion_ternaryfixture regressed:hash('xxh128')inside aPHP_VERSION_ID >= 80100 ?guard was rewritten tomd5instead of being skipped.Two skip paths both stopped catching
PHP_VERSION_IDguards:PHP_VERSION_CONDITIONEDattribute is only set upstream forversion_compare()conditions, notPHP_VERSION_IDbinary ops.IntegerRangeTypewith min80100, but the scope now resolves to a concreteConstantIntegerType, so that branch never triggers.This subscribes the rule to
Ternary/If_, and when their condition is aPHP_VERSION_IDcomparison, marks the innerhash()calls withPHP_VERSION_CONDITIONEDso they are skipped the same wayversion_compare()guarded calls already are. The dead scope-based check is removed.