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

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

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

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

automatix opened this issue Mar 18, 2018 · 9 comments

Comments

@automatix
Copy link

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
Copy link
Member

mnapoli commented Mar 20, 2018

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

@mrailton
Copy link

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
Copy link
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
Copy link
Contributor

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

@SvenRtbg
Copy link
Contributor

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

@mrailton
Copy link

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
Copy link
Contributor

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

@nikic
Copy link

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
Copy link
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
Projects
None yet
Development

No branches or pull requests

6 participants