mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
isNextAllAnySome uses doctrine/lexel:1 syntax and throws PHP Error #7158
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @L3tum on GitHub (May 22, 2023).
Bug Report
Summary
Parser.php#585 uses an array-key based access pattern for Lexer Tokens, while all other accesses were changed in
603ab9a185.This currently results in the following error:
Current behavior
The object property is accessed via array-access. This blocks basically any attempt to update to any version that contains the commit above.
How to reproduce
Install latest version of this library. Not sure which configuration/context triggers the exact line of code, but it's obviously wrong.
Expected behavior
It works.
@greg0ire commented on GitHub (May 22, 2023):
doctrine/lexerv2 comes with a BC layer based on array-access. That layer is removed in v3. So no, it's not obviously wrong. What version ofdoctrine/lexerare you using?@L3tum commented on GitHub (May 22, 2023):
Version 2.1.0 is what we've got installed, and we didn't add it manually in our composer.json (so the version was automatically picked)
@greg0ire commented on GitHub (May 22, 2023):
Ok 🤔 … when you open
vendor/doctrine/lexer/src/Token.php, does it sayimplements ArrayAccess? Here is how it should look like, according to what you're telling me: https://github.com/doctrine/lexer/blob/2.1.0/src/Token.php#L19@L3tum commented on GitHub (May 22, 2023):
Okay, gotta apologize for the confusion. I checked again and it got the ArrayAccess. Then I downgraded to Lexer v1 and...it still complained about Token.php, despite it literally not existing.
So I checked our phpunit vendor folder (we keep them separate) and voilà, apparently some dependency in there used the Lexer and upgraded to v3, essentially breaking our tests while everything else seemed to work.
It now works correctly....thank you for your time^^
@greg0ire commented on GitHub (May 22, 2023):
No worries 🙂