Skip to content
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

Deprecation notice using Doctrine\Common\Lexer\Token properties via ArrayAccess #475

Closed
josephLaurent opened this issue Mar 25, 2024 · 1 comment
Labels

Comments

@josephLaurent
Copy link

Hello,

I have some deprecation notice using Coduo\PHPMatcher\PHPUnit\PHPMatcherAssertions::matchesPattern function because Coduo\PHPMatcher\Parser is using deprecated array access on a Coduo\PHPMatcher\Lexer object.

I have exactly this error:

Indirect deprecation triggered by App\Tests\Functional\Controller\Campaign\Cost\GetControllerTest::testCanDenyAccess:
Accessing Doctrine\Common\Lexer\Token properties via ArrayAccess is deprecated, use the value, type or position property instead (Token.php:68 called by Parser.php:266, https://github.com/doctrine/lexer/pull/79, package doctrine/lexer)
Stack trace:
#0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(16384, 'Accessing Doctr...', '/srv/app/vendor...', 210)
#1 vendor/doctrine/lexer/src/Token.php(68): Doctrine\Deprecations\Deprecation::trigger('doctrine/lexer', 'https://github....', 'Accessing Doctr...', 'Doctrine\\Common...')
#2 vendor/coduo/php-matcher/src/Parser.php(266): Doctrine\Common\Lexer\Token->offsetExists('position')
#3 vendor/coduo/php-matcher/src/Parser.php(72): Coduo\PHPMatcher\Parser->unexpectedSyntaxError(Object(Doctrine\Common\Lexer\Token), '@type@ pattern')
#4 vendor/coduo/php-matcher/src/Parser.php(60): Coduo\PHPMatcher\Parser->getPattern()
#5 vendor/coduo/php-matcher/src/Parser.php(32): Coduo\PHPMatcher\Parser->getAST('{"error":"Acces...')
...

It's seem really easy to fix and I can try to do it if it help ?
Thank you in advance for your help :)

@norberttech
Copy link
Member

resolved by #477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants