Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master from 5.x #10775

Merged
merged 24 commits into from
Mar 2, 2024
Merged

Update master from 5.x #10775

merged 24 commits into from
Mar 2, 2024

Conversation

weirdan
Copy link
Collaborator

@weirdan weirdan commented Mar 2, 2024

  • Fix a false flag issue with InvalidConstantAssignmentValue being thrown for constants over a certain length. Usually happens with arrays or lists over 100+ entries in length.
  • Set inside_isset false when analyzing ArrayDimFetch dim
  • Fix new errors
  • Forbid iterating over generators with non-nullable send()
  • Strip null used to signify completed iterations in foreach context
  • Disabled wrong test
  • Let's see what breaks without this hack
  • Set inside_isset = false when analyzing arguments
  • Fix PHP notice - crash on invalid taint-escape
  • Fix version comparison for @since
  • Avoid duplicating code for RiskyTruthyFalsyComparison
  • fix unrelated Config bug not honoring PHP composer versions 8.2 + 8.3
  • @SInCE annotations should only infer PHP version in .phpstub files or for @SInCE 8.0.0 PHP
  • Initial support for named parameters for callables

MelechMizrachi and others added 23 commits February 23, 2024 11:25
…wn for constants over a certain length. Usually happens with arrays or lists over 100+ entries in length.

Check if this type was defined via a dockblock or type hint otherwise the inferred type should always match the assigned type, and we don't even need to do additional checks
There is an issue with constants over a certain length where additional values are added to fallback_params in the assigned_type but not in const_storage_type which causes a false flag for this error to appear. Usually happens with arrays/lists.

Added two separate tests to cover both lists, and arrays to ensure this issue is fixed.
Even though `Generator::current()` can return `null` once generator is
exhausted, `foreach()` never iterates after iterator ends, so we can
safely remove `null` (unless, of course, generator can yield `null`).
@weirdan weirdan added the release:internal The PR will be included in 'Internal changes' section of the release notes label Mar 2, 2024
@weirdan weirdan requested review from danog and orklah March 2, 2024 19:45
@weirdan weirdan marked this pull request as ready for review March 2, 2024 20:36
@weirdan weirdan merged commit 3600d51 into vimeo:master Mar 2, 2024
42 checks passed
@weirdan weirdan deleted the update-master branch March 2, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:internal The PR will be included in 'Internal changes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants