thecodingmachine / graphqlite

Use PHP Attributes/Annotations to declare your GraphQL API
https://graphqlite.thecodingmachine.io
MIT License
554 stars 95 forks source link

Fix magic call #642

Closed oprypkhantc closed 7 months ago

oprypkhantc commented 7 months ago

Closes #638

While fixing this I thought it'd probably be better to explicitly mark field getter and setters with an annotation instead of automatically detecting them with get, set and is prefixes, but maybe just waiting till PHP 8.4 is a better call: by PHP 8.4 we'll hopefully have property accessors so we can drop support for getters/setters/issers and magic __call altogether.

For now, this is just a fix of precedence - now "real" properties always take precedence over __call calls.