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

nikic/php-parser 4 for PHP-DI/PHP-DI 6? #585

Closed
automatix opened this Issue Mar 18, 2018 · 9 comments

Comments

Projects
None yet
6 participants
@automatix

automatix commented Mar 18, 2018

Hello!

I've just installed Symfony 4 and would like to use it with the currently latest version of PHP-DI, the v6.

$ composer require php-di/php-di ^6.0
...
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for php-di/php-di ^6.0 -> satisfiable by php-di/php-di[6.0.0].
    - Conclusion: remove nikic/php-parser v4.0.0
    - Conclusion: don't install nikic/php-parser v4.0.0

So the problem is, that one of the Symfony packages (namely symfony/maker-bundle) needs the nikic/php-parser ^4.0. And this dosn't meet the PHP-DI's requirements defined in its composer.json:

"require": {
    ...
    "nikic/php-parser": "^2.0|^3.0"
},

The nikic/PHP-Parser's v4 was released 18 days ago. And the PHP-DI's v6 was released about a week earlier. So is the restriction to the ^2.0|^3.0 just outdated and should be extended with ^4.0? If so, could the core developers please update it.

Thanks

@mnapoli

This comment has been minimized.

Member

mnapoli commented Mar 20, 2018

Thanks, feel free to send a pull request if you have time.

@railto

This comment has been minimized.

railto commented Mar 21, 2018

I've had a look at this myself. It seems that jeremeamia/SuperClosure has not been updated to work with nickic/PHP-Parser v4.0 yet. Tried installing only v4.0 and jeremeamia/SuperClosure threw conflicts.

Until such times as jeremeamia/SuperClosure is updated it won't be possible to verify that this package works with nickic/PHP-Parser v4.0

@mnapoli

This comment has been minimized.

Member

mnapoli commented Mar 21, 2018

👍 thanks for starting the work. The best course of action then would be to send a pull request to SuperClosure first. I'll try to do that myself in the next weeks but I don't have a time estimate, contributions are welcome ;)

@jdreesen

This comment has been minimized.

Contributor

jdreesen commented Mar 21, 2018

It seems that support has already been added in jeremeamia/super_closure#104 but it has not been released yet.

@SvenRtbg

This comment has been minimized.

SvenRtbg commented Mar 22, 2018

SuperClosure 2.4.0 has been released almost right after your comment.
https://github.com/jeremeamia/super_closure/releases/tag/2.4.0

@railto

This comment has been minimized.

railto commented Mar 22, 2018

Just tested, seems that the new holdup is phpstan, lol. Version 0.9.2 requires php-parser at ^3.1 and not seeing any PR's there for upping it, might look at that one later

@jdreesen

This comment has been minimized.

Contributor

jdreesen commented Mar 22, 2018

It seems to be scheduled for the v0.10 milestone. See: phpstan/phpstan#859

@nikic

This comment has been minimized.

nikic commented Apr 10, 2018

As your version constraint would become ^2.0|^3.0|^4.0, that still satisfies the ^3.1 constraint by phpstan, so I'm not sure why that's a blocker. It will not be a conflict for dependent libraries, as they don't install dev dependencies.

@mnapoli mnapoli added the enhancement label Apr 21, 2018

@mnapoli mnapoli closed this in d538302 Apr 21, 2018

@mnapoli

This comment has been minimized.

Member

mnapoli commented Apr 21, 2018

Yep no blocker here, thanks for the feedback it's fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment