iodigital-com / phpstan-magento2-stubs
PHPStan Magento 2 stub files
Installs: 121
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 2
Open Issues: 0
Type:phpstan-extension
Requires
- php: ~8.0.0 || ~8.1.0 || ~8.2.0
- phpstan/phpstan: ^1.9.0|^2.0
Replaces
This package is auto-updated.
Last update: 2025-03-18 08:46:10 UTC
README
PHPStan stubfiles for the Magento 2 framework. Currenly the stub files are targeted towards the 2.4.7.x version.
Installation
composer require --dev iodigital-com/phpstan-magento2-stubs
If you use the phpstan/extension-installer package. You do not need any further configuraton. However if you do not use this package. Add the following configuration to your phpstan.neon
file.
includes: - ./vendor/iodigital-com/phpstan-magento2-stubs/extension.neon
Notes
It is not possible to replace @method in stubFiles since it will overwrite the complete phpdoc. This means you will have to copy all the @methods from that specific class. Please ignore this in your PHPStan Baseline.