Skip to content

Further reflection api improvements - #1896

Draft
Christian Sciberras (uuf6429) wants to merge 1 commit into
JetBrains:masterfrom
uuf6429:improve-reflaction-api-further
Draft

Further reflection api improvements#1896
Christian Sciberras (uuf6429) wants to merge 1 commit into
JetBrains:masterfrom
uuf6429:improve-reflaction-api-further

Conversation

@uuf6429

@uuf6429 Christian Sciberras (uuf6429) commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Changes:

  • fixes a mistake in my previous reflection PR regarding getAttributes() return type
  • changes method name strings to non-falsy-string to align with phpstan stubs
  • improves type hinting of reflaction class initializers (heavily inspired from phpstan stubs)
  • since reflection classes are now mainly generic, fixed the ones with undefined templates
  • a few other minor fixes

Some relevant links:

@uuf6429

Christian Sciberras (uuf6429) commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Ondřej Mirtes (@ondrejmirtes) when you have time, could you maybe let me know if I'm missing something? I'd gladly do the relevant changes on phpstan side as well (as I started already).

My remaining question so far is the 2x stub definitions in phpstan regarding the *WithLazyObjects cases, if/how I should handle that (in particular, I don't understand why they would require @template-covariant).

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