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

Consider adding support for doctrine/lexer 3 #473

Closed
Guuzen opened this issue Feb 29, 2024 · 9 comments
Closed

Consider adding support for doctrine/lexer 3 #473

Guuzen opened this issue Feb 29, 2024 · 9 comments

Comments

@Guuzen
Copy link
Contributor

Guuzen commented Feb 29, 2024

For now, it is not supported.
It prevents doctrine/orm package from being upgraded because it requires doctrine/lexer 3 and higher.

@norberttech
Copy link
Member

Hey, yes I’m aware of this limitation, in fact, I even tried to upgrade but keeping support for all the versions seems to be a bit problematic due to bc breaks in the lexer.
Instead, I think we might want to drop doctrine lexer and look into something that does not put constraints on things like Dbal/ORM

https://github.com/phplrt/phplrt seems to be a nice alternative

@Guuzen
Copy link
Contributor Author

Guuzen commented Mar 2, 2024

but keeping support for all the versions seems to be a bit problematic due to bc breaks in the lexer.

Is there any reason to keep the support of the old versions of doctrine/lexer? Maybe there are other advantages of replacing the dependency? 🤔

@norberttech
Copy link
Member

honestly, the only reason is that I don't want php-matcher to force upgrades of orm/dbal at all projects that are using it. I would also prefer to detach from doctrine in general, not because it's bad, but because it's coupled with orm/dbal

@jkobus
Copy link
Contributor

jkobus commented Apr 9, 2024

I think this is the reason I am unable to install it in a project with symfony 6.4:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - coduo/php-matcher[v1.0.0, ..., 1.1.8] require symfony/property-access ~2.3 -> found symfony/property-access[v2.3.0, ..., v2.8.52] but the package is fixed to v6.4.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - coduo/php-matcher[2.0.0, ..., 2.4.0] require symfony/property-access ^2.3|^3.0 -> found symfony/property-access[v2.3.0, ..., v2.8.52, v3.0.0, ..., v3.4.47] but the package is fixed to v6.4.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - coduo/php-matcher[3.0.0, ..., 3.2.3] require symfony/property-access ^2.3|^3.0|^4.0 -> found symfony/property-access[v2.3.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.44] but the package is fixed to v6.4.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - coduo/php-matcher[4.0.0, ..., 4.0.2] require symfony/property-access ^2.3|^3.0|^4.0|^5.0 -> found symfony/property-access[v2.3.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.44, v5.0.0, ..., v5.4.38] but the package is fixed to v6.4.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - coduo/php-matcher[5.0.0, ..., 5.0.1, 6.0.0, ..., 6.0.10] require doctrine/lexer ^1.0 -> found doctrine/lexer[v1.0, ..., 1.2.3] but the package is fixed to 3.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - coduo/php-matcher[6.0.11, ..., 6.0.14] require doctrine/lexer ^1.0||^2.0 -> found doctrine/lexer[v1.0, ..., 1.2.3, 2.0.0, 2.1.0, 2.1.1] but the package is fixed to 3.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires coduo/php-matcher * -> satisfiable by coduo/php-matcher[v1.0.0, ..., 1.1.8, 2.0.0, ..., 2.4.0, 3.0.0, ..., 3.2.3, 4.0.0, 4.0.1, 4.0.2, 5.0.0, 5.0.1, 6.0.0, ..., 6.0.14].


composer why doctrine/lexer 
doctrine/orm                    3.1.0  requires  doctrine/lexer (^3)           
egulias/email-validator         4.0.2  requires  doctrine/lexer (^2.0 || ^3.0) 
scienta/doctrine-json-functions 6.0.0  requires  doctrine/lexer (^2.0 || ^3.0) 
symfony/doctrine-bridge         v6.4.5 conflicts doctrine/lexer (<1.1)         
symfony/validator               v6.4.4 conflicts doctrine/lexer (<1.1) 

Downgrading to:
composer require doctrine/orm:^2

... seems to work for now.

@norberttech
Copy link
Member

hmm maybe as an intermediate step, we should actually upgrade lexer to ^3.0 🤔 I'm a bit busy currently but if anyone would like to bump it to 3.0 we could merge it and release I believe without a new version since it's not a BC break (meaning it can't break anyone code because composer would prevent update)

@norberttech
Copy link
Member

resolved by #477

@adam-marchewicz-tg
Copy link

@norberttech any idea when the new version of php-matcher will be released?

@norberttech
Copy link
Member

@norberttech any idea when the new version of php-matcher will be released?

hey, sorry for the daly, I was waiting for another PR to get merged. I still need to resolve some tools dependencies conflicts but I believe I should be able to push new release later today

@adam-marchewicz-tg
Copy link

Thanks for the quick response. Sounds great!

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

No branches or pull requests

4 participants