chore: apply Rector null-coalescing assignment rule from newer tool versions - #862
Merged
Merged
Conversation
Rector 2.6.x's IfToNullCoalescingAssignRector flags four pre-existing
if (null === $x) { $x = ... } guards. composer.lock is not committed, so
CI now resolves the newer Rector and the dry-run gate fails on every open
PR until these are updated.
tanya732
approved these changes
Aug 31, 2026
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.
Changes
CI installs its dev tools from open version ranges and there is no committed
composer.lock, so it recently pulled in a newer Rector (2.6.x). That version enablesIfToNullCoalescingAssignRector, which is why the Rector job started failing on unrelated PRs.if (null === $x) { $x = ...; }guards to$x ??= ..., which is equivalent.src/Token.php,src/Token/Parser.php,src/Utility/HttpResponsePaginator.php, andsrc/Utility/HttpTelemetry.php.src/Token/Parser.phpthe@codeCoverageIgnoremarkers were kept around the rewritten line, since it remains untestable with the current JWT encoding test libraries.References
Unblocks the Rector CI job on open PRs (#852, #853, #861).
Testing
Contributor Checklist