Skip to content

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

Closed

Description

@automatix

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

Activity

  1. mnapoli commented on Mar 20, 2018

    @mnapoli
    Member

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

  2. mrailton commented on Mar 21, 2018

    @mrailton

    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

  3. mnapoli commented on Mar 21, 2018

    @mnapoli
    Member

    👍 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 ;)

  4. jdreesen commented on Mar 21, 2018

    @jdreesen
    Contributor

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

  5. SvenRtbg commented on Mar 22, 2018

    @SvenRtbg
    Contributor

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

  6. mrailton commented on Mar 22, 2018

    @mrailton

    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

  7. jdreesen commented on Mar 22, 2018

    @jdreesen
    Contributor

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

  8. nikic commented on Apr 10, 2018

    @nikic

    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.

  9. mnapoli commented on Apr 21, 2018

    @mnapoli
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions