statamic / docs

Statamic Documentation
https://statamic.dev
Other
105 stars 367 forks source link

Sort reserved words list alphabetically #1362

Closed brad-sf closed 2 weeks ago

brad-sf commented 4 weeks ago

Using hook as a field name throws Too few arguments to function Statamic\Entries\Entry::hook() errors when fetching collections via the API.

Also I've sorted the list alphabetically.

duncanmcclean commented 3 weeks ago

I have a feeling we might be able to make hook fields just work, without needing to add it to the list of reserved words.

I haven't tested it but we might be able to add hook to the array here: https://github.com/statamic/cms/blob/5.x/src/Data/AbstractAugmented.php#L95