Skip to content

Commit 2865510

Browse files
authored
fix: add nikic/php-parser requirement for translation:extract in translation.rst
1 parent fabff4d commit 2865510

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

translation.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,16 @@ The ``translation:extract`` command looks for missing translations in:
457457
* Any PHP file/class stored in the ``src/`` directory that uses
458458
:ref:`Constraints Attributes <validation-constraints>` with ``*message`` named argument(s).
459459

460+
To read PHP files, is used the new ``PhpAstExtractor`` service supports all kinds of trans() function calls, usages of TranslatableMessage class, messages defined in validation constraints, etc...
461+
462+
To use the new translation extractor, install the ``nikic/php-parser`` package using Composer, before using `translation:extract`.
463+
464+
465+
.. code-block:: terminal
466+
467+
$ composer require nikic/php-parser
468+
469+
460470
.. _translation-resource-locations:
461471

462472
Translation Resource/File Names and Locations

0 commit comments

Comments
 (0)