Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd759f8d

Browse files
committed
[PropertyInfo] Added an versionadded block to explicitly denote what behavior has changed with symfony 6.4
1 parent8cf82f2 commitd759f8d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎components/property_info.rst‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,15 @@ provide whether properties are readable or writable as booleans::
225225
The:class:`Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor` looks
226226
for getter/isser/setter/hasser method in addition to whether or not a property is public
227227
to determine if it's accessible. This based on how the:doc:`PropertyAccess</components/property_access>`
228-
works. It assumes camel-case style method names following `PSR-1`_. Therefore, a property like ``myProperty`` or ``my_property`` is
228+
works. It assumes camelcase style method names following `PSR-1`_. Therefore, a property like ``myProperty`` or ``my_property`` is
229229
readable if it has a ``getMyProperty()`` and writable if it has a ``setMyProperty()`` method.
230230

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+
236+
231237
.. _property-info-initializable:
232238

233239
Property Initializable Information

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp