Skip to content

Commit

Permalink
minor #38138 [Translation] fix parsing tokens on PHP 8 (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Translation] fix parsing tokens on PHP 8

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

1d1194e fix parsing tokens on PHP 8
  • Loading branch information
Tobion committed Sep 10, 2020
2 parents 6bf856c + 1d1194e commit 38e4140
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Symfony/Component/Translation/Extractor/PhpExtractor.php
Expand Up @@ -87,6 +87,16 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface
',',
self::DOMAIN_TOKEN,
],
[
'new',
'\Symfony\Component\Translation\Translatable',
'(',
self::MESSAGE_TOKEN,
',',
self::METHOD_ARGUMENTS_TOKEN,
',',
self::DOMAIN_TOKEN,
],
[
'new',
'\\',
Expand All @@ -100,6 +110,12 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface
'(',
self::MESSAGE_TOKEN,
],
[
'new',
'\Symfony\Component\Translation\Translatable',
'(',
self::MESSAGE_TOKEN,
],
[
't',
'(',
Expand Down

0 comments on commit 38e4140

Please sign in to comment.