Giter VIP home page Giter VIP logo

Comments (8)

hostep avatar hostep commented on August 26, 2024 2

@shochdoerfer: I just tested the new major phpstan version out by hacking my composer dependencies like so:

    "require-dev": {
        "bitexpert/phpstan-magento": "^0.9.0",
        "phpstan/phpstan": "1.0.2 as 0.12.99"
    },

This allowed me to install phpstan version 1.0.2 in combination with 0.9.0 of this module.

And executing phpstan works perfectly fine, so it looks like your module works without issues on version 1 of phpstan (not sure if my code covers all your features, so don't take this as your module is 100% compatible yet).
But in case it's discovered that this module works 100% fine with version 1.0 of phpstan, I would suggest to change the version constraints in your module to:

    "phpstan/phpstan": "^0.12.23 || ^1.0"

This will allow people to keep using your module in a Magento 2 project, and also allow people that are using your module outside of a Magento 2 project to already upgrade to version 1.0 of phpstan.

from phpstan-magento.

hostep avatar hostep commented on August 26, 2024 2

FYI: phpstan 1.x is also coming to Magento: magento/magento2#34555 πŸ˜‰

from phpstan-magento.

shochdoerfer avatar shochdoerfer commented on August 26, 2024 2

@hostep stop doing MY job :P Had this on my todo list as well...

from phpstan-magento.

shochdoerfer avatar shochdoerfer commented on August 26, 2024 1

Quick update: Have to create a separate release for PHPStan 1.1 as a few internal changes broke the tests. That means we have a release 0.10 of the extension which supports PHPStan 0.12 and a release 0.11 of the extension to support PHPStan 1.1.

from phpstan-magento.

shochdoerfer avatar shochdoerfer commented on August 26, 2024

@sprankhub @hostep what are your thoughts on the PHPStan upgrade to version 1.0?

from phpstan-magento.

shochdoerfer avatar shochdoerfer commented on August 26, 2024

The 0.12.x versions won't get any more updates https://twitter.com/OndrejMirtes/status/1455083738564542467

from phpstan-magento.

sprankhub avatar sprankhub commented on August 26, 2024

If 0.x does not get any more updates, I think we should update to 1.0.

from phpstan-magento.

shochdoerfer avatar shochdoerfer commented on August 26, 2024

@hostep thanks for your analysis. Very much appreciated. Good to know that things seem to work in both versions.

I feel there might be an issue with some dependencies as can be seen here. I recall having read something similar somewhere in the PHPStan release notes or a tweet by OndΕ™ej. I will investigate if this is fixable easily for both versions.

"Worst-case" approach would be to release a version 0.10 of the extension which would be compatible with 0.12 of PHPStan and a version 0.11 of the extension which is compatible with PHPStan 1.0 and maintain both for a while.

from phpstan-magento.

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.