Skip to content

Commit b4d1871

Browse files
committed
[Serializer] Add support for "can" prefixin attribute loader
1 parent 33ea6e8 commit b4d1871

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

serializer.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,10 +1476,14 @@ normalizers (in order of priority):
14761476
to read and write in the object. This allows it to access properties
14771477
directly or using getters, setters, hassers, issers, canners, adders and
14781478
removers. Names are generated by removing the ``get``, ``set``,
1479-
``has``, ``is``, ``add`` or ``remove`` prefix from the method name and
1479+
``has``, ``is``, ``can``, ``add`` or ``remove`` prefix from the method name and
14801480
transforming the first letter to lowercase (e.g. ``getFirstName()`` ->
14811481
``firstName``).
14821482

1483+
.. versionadded:: 7.4
1484+
1485+
Support for the ``can`` prefix was introduced in Symfony 7.4.
1486+
14831487
During denormalization, it supports using the constructor as well as
14841488
the discovered methods.
14851489

0 commit comments

Comments
 (0)