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 #10850

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from
Draft

Update master from 5.x #10850

wants to merge 49 commits into from

Conversation

weirdan
Copy link
Collaborator

@weirdan weirdan commented Mar 21, 2024

  • Use wider class-string when combining class strings with intersections
  • Forbid named arguments for ArrayAcccess methods
  • Allow more callable types as subtypes of callable
  • Don't crash on invalid templates
  • Added test for Method __callStatic() breaks asserts on 5.23 #10807
  • Resolve fail test Method __callStatic() breaks asserts on 5.23 #10807
  • Introduce TCallableInterface
  • add support for named arguments for filter_var and filter_input
  • Promoted properties missing in extended __construct should report PropertyNotSetInConstructor
  • report error for single param too since named args can even be used then
  • Fix PHP 8.1 deprecated calls not reported #7550
  • MissingClassConstType
  • Allow specifying flags to Codebase::isTypeContainedByType
  • cs-fix
  • [PHP 8.4] Fixes for implicit nullability deprecation
  • Fix undefined parent not reported in callable
  • fix tests running with other than called PHP binary if called with a non-default PHP binary
  • Explicitly set value in config to fix warning in tests
  • fix bad class
  • self
  • report invalid callable if callable cannot be called like this from current context
  • ParamNameMismatch not reported for __construct
  • When inside isset
  • Update baseline
  • Additional array fetch test case
  • Update tests/CallableTest.php
  • Update CallMap.php
  • Update CallMap_historical.php

weirdan and others added 30 commits March 9, 2024 20:32
Resolved problem:
```
Psalm\Tests\AssertAnnotationTest::testAssertsAllongCallStaticMethodWork
Psalm\Exception\CodeException: LessSpecificReturnStatement
The type 'string' is more general than the declared return type 'non-empty-string' for returnNonEmpty
```
`TClosure` does not implement it at this point. It's intentional, to maintain the
separation between callables and closures that our code relies on.
Fixes all issues that emits a deprecation notice on PHP 8.4.

See:
 - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types)
 - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)
…non-default PHP binary

e.g. you run the tests with a php83 executable but your default php is PHP 7.4, it will suddenly change while running the tests leading to false positive errors
…an-called-from-php-version

fix tests running with other than called PHP binary if called with a non-default PHP binary
…sts-config

Explicitly set value in config to fix warning in tests
kkmuffme and others added 18 commits March 20, 2024 01:02
This prevents false positive for various types of issues inside empty,
such as RedundantConditionGivenDocblockType and TypeDoesNotContainType.
@weirdan weirdan added the release:internal The PR will be included in 'Internal changes' section of the release notes label Mar 21, 2024
@weirdan weirdan requested review from danog and orklah March 21, 2024 21:19
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.

None yet

10 participants