Giter VIP home page Giter VIP logo

Comments (4)

shochdoerfer avatar shochdoerfer commented on August 26, 2024 1

Thanks for opening the issue. Since PHP 7.1 is not actively supported anymore, I don't feel it make sense to use PHP 7.1 as a minimum requirement. Since this might also influence the package versions we can install as dependencies of bitexpert/phpstan-magento I would like to avoid the move, I'd rather also deprecate PHP 7.2 & PHP 7.3 in the near future. That depends a bit which minimum Magento versions we would want to support. Which Magento version are you using?

You should be able to install the package with the --ignore-platform-reqs flag of Composer. In the latest version you can install the package alongside of your Magento project (e.g. different folder). That means you don't have to use --ignore-platform-reqs when interacting with your Magento application (and risk borked dependencies).

from phpstan-magento.

shochdoerfer avatar shochdoerfer commented on August 26, 2024

By the way, the error message is generated by Composer, not by this package. I don't think there is a way to change that. We can however add the minimum PHP version to the README.md file if that helps.

from phpstan-magento.

ScottA38 avatar ScottA38 commented on August 26, 2024

Hey, thanks for the helpful reply

Which Magento version are you using?

Magento version 2.3.1

You should be able to install the package with the --ignore-platform-reqs flag of Composer. In the latest version you can install the package alongside of your Magento project (e.g. different folder). That means you don't have to use --ignore-platform-reqs when interacting with your Magento application (and risk borked dependencies).

Can you explain a little further please about the separate folder? What kind of configuration is needed to link phpstan-magento to my actual M2 project

By the way, the error message is generated by Composer, not by this package. I don't think there is a way to change that. We can however add the minimum PHP version to the README.md file if that helps.

I think I would gain benefit from this 🙏

Also understandable about not supporting PHP versions that are past EOL
As a professional developer I should probably know these things already 😨 😇

from phpstan-magento.

shochdoerfer avatar shochdoerfer commented on August 26, 2024

My bad, I somehow lost track of this issue.

Assuming you have installed your Magento project in /some/dir/magento you could install PHPStan and this extension in /some/dir. Make sure to use the --ignore-platform-reqs to ignore the minimum PHP version that is required by this extension. Once both Composer dependencies have been installed, create a phpstan.neon configuration file in /some/dir and configure the path to your app/code folder relative to where the phpstan.neon file is located. You would also need to add the vendor directory of your Magento installation to the path as well so that PHPstan can resolve the 3rd party classes used.

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.