Skip to content

Commit 5d29c31

Browse files
committed
minor #20182 [Translation] fix: add nikic/php-parser requirement for translation:extract in tran… (bsramin)
This PR was submitted for the 7.1 branch but it was squashed and merged into the 6.4 branch instead. Discussion ---------- [Translation] fix: add nikic/php-parser requirement for translation:extract in tran… …slation.rst <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> Commits ------- 9041d05 [Translation] fix: add nikic/php-parser requirement for translation:extract in tran…
2 parents 08e3831 + 9041d05 commit 5d29c31

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

translation.rst

+8
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,14 @@ The ``translation:extract`` command looks for missing translations in:
462462
The support of PHP files/classes that use constraint attributes was
463463
introduced in Symfony 6.2.
464464

465+
To read PHP files, is used the new ``PhpAstExtractor`` service supports all kinds of ``trans()`` function calls, usages of :class:`Symfony\\Component\\Translation\\TranslatableMessage` class, messages defined in validation constraints, etc...
466+
467+
To use the new translation extractor, install the ``nikic/php-parser`` package using Composer, before using `translation:extract`.
468+
469+
.. code-block:: terminal
470+
471+
$ composer require nikic/php-parser
472+
465473
.. _translation-resource-locations:
466474

467475
Translation Resource/File Names and Locations

0 commit comments

Comments
 (0)