Repository navigation
fix(include): strict_types applies per file, not from the file that includes it - #14402
Merged
Merged
Conversation
…ncludes it vimeo#14186 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
|
Behaviour change
|
Contributor
✅ Performance: unchanged · Types: increased
How to read this table
✅ drupal: issues +2 −0Memory 4 850 → 4 850 MB (<0.1 %) · Wall 237.4 → 237.7 s (+0.1 %) Weighted 169 104 → 169 106 (+2, <0.01 %): L1 +2
Added (2)
head 482e962 · base cc4ab02 (merge-base) · workflow run |
Collaborator
|
Thanks @jirkace! |
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.
An included file without
declare(strict_types=1)is analysed as strict when it is included from a strict file, so a scalar mismatch is reported twice, asInvalidScalarArgumentand asInvalidArgument.Before
After
The strictness of the includer is also no longer replaced by that of the included file: a file without
strict_typesthat includes a strict file is analysed as non-strict afterwards.Fixes #14186