New phpstan-magento release

New phpstan-magento release

Besides supporting PHPStan version 1.3, the latest phpstan-magento extension release 0.15.0 adds support for extension attributes for both Magento modules and Magento applications.
Extension Attributes allow developers to “extend” existing API Data interfaces by defining additional attributes in an XML-based configuration. The phpstan-magento extension parses these XML definitions and generates the respective interfaces so that PHPStan can analyze these interfaces.

Out-of-the-box phpstan-magento will parse all "extension_attributes.xml" files recursively found in the current working directory (the directory that contains the phpstan.neon configuration file). You can change this behavior by defining a "magentoRoot" parameter in your phpstan.neon file that points to the directory that should be scanned instead:

parameters:
    magento:
        magentoRoot: /tmp/my/other/dir


Disabled Magento modules are not yet taken into account. phpstan-magento will parse all extension_attributes.xml files found in all "etc" directories, regardless if the module is enabled or not.


Eintrag von Stephan Hochdörfer am 10.01.2022

Tags: Magento2, phpstan

Diese Webseite verwendet Cookies, um die Bedienfreundlichkeit zu erhöhen. Mit der Nutzung unserer Webseite wird das Einverständnis erklärt, dass wir Cookies verwenden. Weitere Informationen.