File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,14 @@ provide whether properties are readable or writable as booleans::
225
225
The :class: `Symfony\\ Component\\ PropertyInfo\\ Extractor\\ ReflectionExtractor ` looks
226
226
for getter/isser/setter/hasser method in addition to whether or not a property is public
227
227
to determine if it's accessible. This based on how the :doc: `PropertyAccess </components/property_access >`
228
- works.
228
+ works. It assumes camel case style method names following `PSR-1 `_. Therefore, a property like ``myProperty `` or ``my_property `` is
229
+ readable if it has a ``getMyProperty() `` and writable if it has a ``setMyProperty() `` method.
230
+
231
+ .. versionadded :: 6.4
232
+
233
+ Camel case style setter methods for properties in snake case (like ``my_property ``) are accepted since Symfony 6.4. Before, the
234
+ setter name had to contain the underscores (e.g. `setMy_property() `) to make the property assumed writable.
235
+
229
236
230
237
.. _property-info-initializable :
231
238
@@ -552,6 +559,7 @@ service by defining it as a service with one or more of the following
552
559
* ``property_info.initializable_extractor `` if it provides initializable information
553
560
(it checks if a property can be initialized through the constructor).
554
561
562
+ .. _`PSR-1` : https://www.php-fig.org/psr/psr-1/
555
563
.. _`phpDocumentor Reflection` : https://github.com/phpDocumentor/ReflectionDocBlock
556
564
.. _`phpdocumentor/reflection-docblock` : https://packagist.org/packages/phpdocumentor/reflection-docblock
557
565
.. _`phpstan/phpdoc-parser` : https://packagist.org/packages/phpstan/phpdoc-parser
You can’t perform that action at this time.
0 commit comments