Skip to content

Commit

Permalink
minor #47928 [Translation] Deprecate PhpStringTokenParser (welcoMattic)
Browse files Browse the repository at this point in the history
This PR was merged into the 6.2 branch.

Discussion
----------

[Translation] Deprecate PhpStringTokenParser

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

Following #46161, we could deprecate PhpStringTokenParser, as it's only used by PhpExtractor (which is now deprecated).

Commits
-------

d415129 Deprecate PhpStringTokenParser
  • Loading branch information
welcoMattic committed Oct 20, 2022
2 parents 8435fb9 + d415129 commit d0dc7b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Component/Translation/CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
6.2
---

* Deprecate `PhpStringTokenParser`
* Deprecate `PhpExtractor` in favor of `PhpAstExtractor`
* Add `PhpAstExtractor` (requires [nikic/php-parser](https://github.com/nikic/php-parser) to be installed)

Expand Down
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\Translation\Extractor;

trigger_deprecation('symfony/translation', '6.2', '"%s" is deprecated.', PhpStringTokenParser::class);

/*
* The following is derived from code at http://github.com/nikic/PHP-Parser
*
Expand Down Expand Up @@ -47,6 +49,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/**
* @deprecated since Symfony 6.2
*/
class PhpStringTokenParser
{
protected static $replacements = [
Expand Down

0 comments on commit d0dc7b2

Please sign in to comment.