aonach/magento2-phpstan

PhpStan extension to support Magento 2

Installs: 32 048

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 4

Type:phpstan-extension

v0.8.6 2022-07-19 14:03 UTC

This package is auto-updated.

Last update: 2024-04-19 17:50:03 UTC


README

The extension bootstraps the same autoloader that is run when using Magento 2's unit tests. By default it will place the generated class under var/. Change the environment variable TESTS_TEMP_DIR to change the folder.

Installation Instructions via Composer

composer require --dev aonach/magento2-phpstan

Note on required use of phpstan/extension-installer

Manual installation

If the use of phpstan/extension-installer is not working for you undo the installation by adding

    "replace": {
        "phpstan/extension-installer": "*"
    },

to your project's composer.json file. Then manually include extension.neon in your project's PHPStan config:

includes:
    - vendor/aonach/magento2-phpstan/extension.neon

Or as an alternative approach you can check out https://github.com/bitExpert/phpstan-magento