From 2fba4e2a2da6aeced4c395168f28d07887760dcb Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Fri, 19 Feb 2021 16:12:00 +0000 Subject: [PATCH 1/2] Update extension.neon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix phpstan.neon to work with latest phpstan ``` ⚠️ You're using a deprecated config option autoload_files. ⚠️️ You might not need it anymore - try removing it from your configuration file and run PHPStan again. If the analysis fails, there are now two distinct options to choose from to replace autoload_files: 1) scanFiles - PHPStan will scan those for classes and functions definitions. PHPStan will not execute those files. 2) bootstrapFiles - PHPStan will execute these files to prepare the PHP runtime environment for the analysis. Read more about this in PHPStan's documentation: https://phpstan.org/user-guide/discovering-symbols ``` --- extension.neon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension.neon b/extension.neon index a0bb6f7..a9f01a9 100644 --- a/extension.neon +++ b/extension.neon @@ -4,5 +4,5 @@ services: tags: - phpstan.broker.methodsClassReflectionExtension parameters: - autoload_files: - - %rootDir%/../../fooman/phpstan-magento2-magic-methods/bootstrap.php \ No newline at end of file + bootstrapFiles: + - %rootDir%/../../fooman/phpstan-magento2-magic-methods/bootstrap.php From 2b39a106cfb7819ba0405f506f670beb8b4fa1ec Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Tue, 27 Apr 2021 10:00:43 +0100 Subject: [PATCH 2/2] Update composer.json https://github.com/bitExpert/phpstan-magento/issues/40#issuecomment-644011899 > Seems like the autoload_files option got deprecated with PHPStan 0.12.26. Removing autoload_files won't work as the file contains the logic to register the custom autoloaders --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d9c21a2..abd624b 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ }, "require": { "php": "^7.1", - "phpstan/phpstan": ">=0.12.0", + "phpstan/phpstan": ">=0.12.26", "phpstan/extension-installer": "^1.0", "magento/framework": "^100.0 | ^101.0.0 | ^102.0.0 | ^103.0.0" },