Skip to content

Type the identifier of OverridingAssertsCheck as literals so the identifier extractor can read them - #7302

Merged
ondrejmirtes merged 1 commit into
2.3.xfrom
fix-overriding-asserts-identifier-literals
Dec 3, 2026
Merged

ondrejmirtes merged 1 commit into
2.3.xfrom
fix-overriding-asserts-identifier-literals

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Extract identifiers in phpstan/phpstan fails again since PHAR ef67a9f: https://github.com/phpstan/phpstan/actions/runs/47090047457 reports Internal error: Unknown identifier while analysing file .../src/Rules/PhpDoc/OverridingAssertsCheck.php. The identifier passed to check() from 6102756 was typed string.

The callers pass 'method.childAssertType' (MethodSignatureRule) and 'property.childAssertType' (OverridingPropertyRule). This PR types the parameter as that union, the same fix as ac37f68 and #7296. It changes PHPDoc only.

Verified locally:

  • The identifier extractor with the ef67a9f PHAR on this branch completes with valid JSON, and both identifiers are extracted.
  • bin/phpstan analyse on the changed file and its two callers reports no errors.
  • phpcs is clean.

@ondrejmirtes
ondrejmirtes merged commit 0efdcae into 2.3.x Dec 3, 2026
886 of 915 checks passed
@ondrejmirtes
ondrejmirtes deleted the fix-overriding-asserts-identifier-literals branch December 3, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant