Repository navigation
Report values sharing only null or false with the expected type as invalid - #14742
Conversation
… a pseudo property as invalid array_map-style closure parameters and explicit __set() calls reported PossiblyInvalidArgument / PossiblyInvalidPropertyAssignmentValue when the value only shared null or false with the expected type, unlike other arguments and property assignments, which use canBeContainedBy() with null and false skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
canBeContainedBy() with $ignore_false skipped a false in the expected type but not the false of a bool, so Foo|false passed to Bar|bool was reported as possibly invalid while Foo|false passed to Bar|false was invalid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb4e0ee342
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A template bounded by bool was compared to the true the expected bool had become, and no longer fitted. Dropping the parts of the value that are only null or only false keeps everything else unchanged, and also covers false inside an expected scalar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Performance: unchanged · Types: increased
How to read this table
✅ symfony: drift: same issue count, weight changed; issues +1 −1Memory 3 619 → 3 619 MB (+0.0 %) · Wall 177.0 → 171.9 s (−2.8 %) Weighted 100 629 → 100 632 (+3, <0.01 %): L3 −1 · L6 +1
Changed in place (1) @@ src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php:58 @@
- PossiblyInvalidPropertyAssignmentValue: …ParentNodeDefinitionInterface|null' cannot be assigned possibly different type 'NodeDefinition&ParentNodeDefinitionInterface…
+ InvalidPropertyAssignmentValue: …ParentNodeDefinitionInterface|null' cannot be assigned type 'NodeDefinition&ParentNodeDefinitionInterface…✅ drupal: drift: same issue count, weight changed; issues +1 −1Memory 4 847 → 4 847 MB (+0.0 %) · Wall 241.5 → 236.5 s (−2.1 %) Weighted 169 915 → 169 918 (+3, <0.01 %): L3 −1 · L6 +1
Changed in place (1) @@ core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php:270 @@
- PossiblyInvalidArgument: …array_map expects HttpExceptionInterface, but possibly different type ResourceIdentifierInterface provided
+ InvalidArgument: …array_map expects HttpExceptionInterface, but ResourceIdentifierInterface provided✅ wordpress: drift: same issue count, weight changed; issues +2 −2Memory 2 061 → 2 061 MB (+0.0 %) · Wall 185.7 → 185.9 s (+0.1 %) Weighted 678 503 → 678 509 (+6, <0.01 %): L3 −2 · L6 +2
Changed in place (2) @@ 2 places @@
src/wp-includes/media.php:3870
src/wp-includes/media.php:3899
- PossiblyInvalidArgument: …get_adjacent_image_link expects bool, but possibly different type false|string provided
+ InvalidArgument: …get_adjacent_image_link expects bool, but false|string providedhead 6eb84fa · base b5ea40d (merge-base) · workflow run |
A value that only shares
nullorfalsewith the expected type is reported asPossiblyInvalid…instead ofInvalid…in three places, unlike other arguments and property assignments.Closure parameters of
array_map& co.Before
After
Explicit
__set()calls on a@propertyBefore
After
falseinside an expectedboolBefore
After