graphqlite
graphqlite copied to clipboard
RFC: consider renaming "Annotations" to "Attributes"
Initially, the term "annotations" was used due to the lack of native PHP support for meta annotations over methods and properties.
After PHP 7, PHP introduced attributes - a native instrument available via PHP reflection to add meta information.
GraphQLite dropped support for Doctrine annotations after https://github.com/thecodingmachine/graphqlite/pull/677 (GraphQLite 7)
What about changing naming used everywhere - use attribute instead of annotation?
Examples:
- https://github.com/thecodingmachine/graphqlite/blob/54034734d962f1d73068dedb71895aa90f7d3f07/src/Annotations/MiddlewareAnnotationInterface.php#L7-L10
- https://github.com/thecodingmachine/graphqlite/blob/54034734d962f1d73068dedb71895aa90f7d3f07/src/Annotations/Cost.php#L5
I agree - PR is welcomed.
Also dropping the array $attributes first parameter of a lot of the attributes - would be nice :)