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

Merged
merged 58 commits into from
Feb 9, 2024
Merged

Update master from 5.x #10684

merged 58 commits into from
Feb 9, 2024

Conversation

weirdan
Copy link
Collaborator

@weirdan weirdan commented Feb 9, 2024

  • Fix unstable hasFullyQualified(Interface|Enum)()
  • Reflection may reference interfaces and enums
  • Un-ignore recursiveiteratoriterator::__construct
  • Un-ignore arrayobject::getiterator - appears it's been fixed too
  • Fix test by preloading interface
  • Drop suppression as the method is now used in tests
  • Analyze dynamic static property names
  • Analyze dynamic class const names
  • Fix additional places where base_dir was broken due to missing separator
  • additional places with inconsistent trailing slash
  • fix /src/psalm.xml not removed between tests and remove psalm.xml at the end of tests
  • fix errors output in stdout making test fails with cryptic errors
  • improve getcwd return type
  • improve realpath and readlink return type
  • improve file_put_contents return type
  • Add MissingOverrideAttribute issue
  • Move Override tests to separate file
  • Emit MissingOverrideAttribute
  • Apply suggestions from code review
  • Late binding of enum cases
  • directory_separator optional wrong
  • code review add die to forbidden functions for psalm itself
  • ParseError for dynamic constants before PHP 8.3
  • Test for dynamic enum fetch
  • Suppress UndefinedClass in whatever_exists()
  • Flag stdClass::__construct() calls that have arguments
  • Regression and fail tests
  • Fix parsing magic method annotations
  • Strip callmap prefixes from parameter names
  • Fix ord() has no range constraint on its output #10667
  • Revert partial mistakenly pushed fix
  • Improved Reflection stubs ReflectionParameter::getPosition() is non-negative-int. ReflectionMethod name property is always non-empty-string. ReflectionAttribute::getTarget() returns Attribute::TARGET_* instead of int-mask. Even for attributes of promoted properties (https://3v4l.org/rpM1t). *::getAttributes() always returns a list (https://3v4l.org/LYAMb).
  • Added ReflectionParameter::getPosition to CallMap_historical.php
  • Narrow ord() return type to int<0,255>
  • Fix is_object false positive when 'V as int|stdClass'
  • Fix other assertion errors with union templates
  • Don't show backtrace in InvalidDocblock issue message
  • Support parsing constants in shapes

weirdan and others added 30 commits January 29, 2024 22:42
Before this change, calling:
```php
$classlikes->hasFullyQualifiedInterfaceName($i); // true
$classlikes->hasFullyQualifiedClassName($i); // false
$classlikes->hasFullyQualifiedInterfaceName($i); // false
```
would result in the last call returning `false`
Resolves a number of long-standing bugs ('Failed to infer case value ...')

Fixes vimeo#10374
Fixes vimeo#10560
Fixes vimeo#10643
Fixes vimeo#8978
issidorov and others added 20 commits February 6, 2024 17:01
Fix parsing for code:

```
/**
 * @method static (string|int)[] getArray()
 * @method static (callable() : string) getCallable()
 */
class MyClass {}
```

Resolved tests:

```
1) testMethodAnnotation with data set "static (string|int)[] getArray()"
2) testMethodAnnotation with data set "static (callable() : string) getCallable()"
```
Revert partial mistakenly pushed fix
ReflectionParameter::getPosition() is non-negative-int.
ReflectionMethod name property is always non-empty-string.
ReflectionAttribute::getTarget() returns Attribute::TARGET_* instead of int-mask. Even for attributes of promoted properties (https://3v4l.org/rpM1t).
*::getAttributes() always returns a list (https://3v4l.org/LYAMb).
@weirdan weirdan added the release:internal The PR will be included in 'Internal changes' section of the release notes label Feb 9, 2024
@weirdan weirdan requested review from danog and orklah February 9, 2024 22:38
@weirdan weirdan marked this pull request as ready for review February 9, 2024 23:38
@weirdan weirdan merged commit c03a8a0 into vimeo:master Feb 9, 2024
41 of 42 checks passed
@weirdan weirdan deleted the update-master branch February 9, 2024 23:40
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.

8 participants