Skip to content

Conversation

@uuf6429
Copy link
Contributor

@uuf6429 uuf6429 commented Oct 26, 2025

  • in certain places, it's practically guaranteed that a non-empty-string is expected since symbols cannot have an empty string, so I updated them accordingly
  • I've replaced T template type name with something more readable - in one case this even fixed a bug because T was defined for the entire class AND on a specific method.
  • when possible, I replace the general array type with something more specific - list or indexed array etc.
  • added some missing templates types, mainly on constructors e.g. @template TReflectedClass of UnitEnum

Dislcaimer:

  • I was not able to run tests locally, as per Various fixes #1805 (comment)
  • It's likely this change might cause static analyser errors in projects using it.

E.g. the following would now fail (but it should have already): https://phpstan.org/r/09d7d483-6aad-41df-805e-75d44edbec32
It's worth noting that now it would also fail in "unsecured" cases e.g. if the method name was retrieved from somewhere returning string instead of non-empty-string

@uuf6429 uuf6429 marked this pull request as draft October 26, 2025 15:06
@uuf6429 uuf6429 force-pushed the improved-reflection branch from 5f57de5 to 113b050 Compare October 26, 2025 15:51
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