Skip to content

Commit 8263a8e

Browse files
committed
feature #21273 [Serializer] Add support for can prefix in attribute loader (javiereguiluz)
This PR was merged into the 7.4 branch. Discussion ---------- [Serializer] Add support for `can` prefix in attribute loader Fixes #21209. Commits ------- b4d1871 [Serializer] Add support for "can" prefixin attribute loader
2 parents a3ab3af + b4d1871 commit 8263a8e

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)