File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -1071,23 +1071,16 @@ file
1071
1071
1072
1072
When executing the ``translation:extract `` command, it uses extractors to
1073
1073
extract translation messages from a file. By default, the Symfony Framework
1074
- has a :class: `Symfony\\ Bridge\\ Twig\\ Translation\\ TwigExtractor ` and a PHP
1075
- extractor to find and extract translation keys from Twig templates and PHP files .
1074
+ has a :class: `Symfony\\ Bridge\\ Twig\\ Translation\\ TwigExtractor ` to find and
1075
+ extract translation keys from Twig templates.
1076
1076
1077
- Symfony includes two PHP extractors: :class: `Symfony\\ Component\\ Translation\\ Extractor\\ PhpExtractor `
1078
- and :class: `Symfony\\ Component\\ Translation\\ Extractor\\ PhpAstExtractor `. The
1079
- first one is simple but doesn't require to install any packages; the second one
1080
- is much more advanced, but requires to install this dependency in your project:
1077
+ If you also want to find and extract translation keys from PHP files, install
1078
+ the following dependency to activate the :class: `Symfony\\ Component\\ Translation\\ Extractor\\ PhpAstExtractor `:
1081
1079
1082
1080
.. code-block :: terminal
1083
1081
1084
1082
$ composer require nikic/php-parser
1085
1083
1086
- .. deprecated :: 6.2
1087
-
1088
- The ``PhpExtractor `` class is deprecated since Symfony 6.2. The ``PhpAstExtractor ``
1089
- class will be the only PHP extractor available starting from Symfony 7.0.
1090
-
1091
1084
You can create your own extractor by creating a class that implements
1092
1085
:class: `Symfony\\ Component\\ Translation\\ Extractor\\ ExtractorInterface `
1093
1086
and tagging the service with ``translation.extractor ``. The tag has one
You can’t perform that action at this time.
0 commit comments