PHP

New in Symfony 8.2: Custom Property Accessors

Symfony 8.2 adds a #[WithAccessors] attribute to the PropertyInfo component, letting developers name the methods that read and write a property instead of relying on conventions such as getName(), setName() or addRole(). The feature, contributed by HypeMC in pull request #59529, supports getter, setter, adder and remover methods with domain names like rename() or grant(). Previously such methods were invisible to Symfony and required a custom extractor. The release also improves the metadata of property hooks.

AI-written summary, checked against the cited sources. How summaries work

Image: Symfony Blog

Read at Symfony Blog

Release

Version
8.2
Released
Release notes
Symfony Blog