Repository navigation
Add explicit @return to ArrayCollection::offsetGet() - #1161
Merged
Merged
Conversation
Symfony's DebugClassLoader reports a deprecation for ArrayAccess::offsetGet() implementations lacking a native return type or a plain @return annotation. A native mixed type isn't possible while PHP 7.4 is supported. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CymVyjcg2P4vuyxLC1FHoE
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CymVyjcg2P4vuyxLC1FHoE
php-code-coverage 14.4 (PHPUnit 13.4) exceeds the default 128M limit when collecting coverage on PHP 8.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PHPUnit 12+ ignores docblock annotations, so @runInSeparateProcess tests ran
in-process. CursorTest's ini_set('memory_limit', '128M') then leaked into the
rest of the suite, which exceeds that limit when collecting coverage with
php-code-coverage 14.4. Add the equivalent attribute alongside the annotation.
It is aliased on import because Slevomat's UnusedUses sniff otherwise flags
the annotation as a case mismatch with the class name.
PHPStan 2.3 no longer reports arrayValues.list here, so don't fail when that
ignore goes unmatched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Requested by Colin · project thread
Fixes #1158.
Symfony's
DebugClassLoaderemits a deprecation notice forArrayAccess::offsetGet()implementations that have neither a nativemixedreturn type nor a plain@returnannotation.ArrayCollection::offsetGet()already has#[\ReturnTypeWillChange](which silences PHP itself) but only had@phpstan-return, which Symfony doesn't read.A native
mixedreturn type isn't possible in 2.x sincemixedrequires PHP 8.0 and we still support 7.4, so this adds@return mixed|nullalongside the existing@phpstan-return T|null, matching howgetIterator()is already documented. Docblock-only change; no runtime or BC impact.🤖 Generated with Claude Code
https://claude.ai/code/session_01CymVyjcg2P4vuyxLC1FHoE
Generated by Claude Code