Coder Social home page Coder Social logo

Comments (9)

ondrejmirtes avatar ondrejmirtes commented on September 15, 2024

Hi, this is not possible, the new PHP parser is quite different and it's not possible to support old and new version at the same time.

from phpstan-symfony.

ondrejmirtes avatar ondrejmirtes commented on September 15, 2024

Your solution is to install PHPStan separately with a different composer.json (in a subdirectory perhaps) or use something like Docker for this (https://github.com/phpstan/docker-image).

from phpstan-symfony.

d42ohpaz avatar d42ohpaz commented on September 15, 2024

@ondrejmirtes you misunderstand, I am by far not asking for support of ^1.0. Please re-read this key statement:

My suggestion, as a library, would be to use a less restrictive version constraint of >=4.0 so that your library can still take advantage of the minimum requirements while not conflicting with newer packages/libraries depending on newer versions.

from phpstan-symfony.

ondrejmirtes avatar ondrejmirtes commented on September 15, 2024

I don't see how having "nikic/php-parser": ">=4.0" instead of "nikic/php-parser": "^4.0" would help?

from phpstan-symfony.

d42ohpaz avatar d42ohpaz commented on September 15, 2024

@ondrejmirtes if package/xyz requires nikic/php-parser: "^5.0", then I would not be able to use phpstan/phpstan-symfony because this package's constraint says it's restricted to just the 4.0 branch. If, however, this package said >=4.0, then everybody would be happy.

from phpstan-symfony.

ondrejmirtes avatar ondrejmirtes commented on September 15, 2024

It would be too dangerous to proclaim support for php-parser 5.x when there will be BC breaks and work involved to really support it. 😊

from phpstan-symfony.

d42ohpaz avatar d42ohpaz commented on September 15, 2024

@ondrejmirtes Thank you for the pointer about different directories; it caused me to stumble on support for environment variables by composer, which let's me hack around this ugly limitation.

I will leave you with this plea: please strongly consider opening up version constraints (as much as future versions will allow you, re: backward-compatibility). Short-sightedness leads to doors being slammed in developer's faces.

Thank you! :)

from phpstan-symfony.

ondrejmirtes avatar ondrejmirtes commented on September 15, 2024

I have to always consider the maintenance burden when opening up the constraints but maybe the next major PHP-Parser version won't contain as many changes 😊 After all, I supported 2.x alongside 3.x for a long time 😊

from phpstan-symfony.

github-actions avatar github-actions commented on September 15, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from phpstan-symfony.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.