Skip to content

[Translation] Deprecate the PhpExtractor #18515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

javiereguiluz
Copy link
Member

Related to #18507.

Symfony includes two PHP extractors: :class:`Symfony\\Component\\Translation\\Extractor\\PhpExtractor`
and :class:`Symfony\\Component\\Translation\\Extractor\\PhpAstExtractor`. The
first one is simple but doesn't require to install any packages; the second one
is much more advanced, but requires to install this dependency in your project:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more advanced

I think we can tell at least it supports latest PHP8 syntax and maybe better performance (but I don't know if there is en benchmark)

From PR symfony/symfony#46161

to support various syntax, especially PHP8 new syntax (named arguments for example)

In order to make this new extractor sustainable, performant and maintainable, it must be based on AST

WDYT ?

Copy link
Member Author

@javiereguiluz javiereguiluz Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this. If we mention "PHP 8 features" ... that will be outdated "soon" when new PHP versions release.

Also, we don't really need to sell the new extractor so people choose it. In next Symfony versions they can only use the AST extractor, so they can't really make a decision, just comply.

@javiereguiluz javiereguiluz merged commit fc0362f into symfony:6.2 Jul 7, 2023
@javiereguiluz javiereguiluz deleted the php_ast_translator branch July 7, 2023 07:23
javiereguiluz added a commit that referenced this pull request Jul 7, 2023
…Symfony 7.0 (javiereguiluz)

This PR was merged into the 7.0 branch.

Discussion
----------

[Translation] Update the PHP extraction information for Symfony 7.0

Same as #18515 but for 7.0.

Commits
-------

a3e5a06 [Translation] Update the PHP extraction information for Symfony 7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants