Skip to content

Commit 84ad6a8

Browse files
committed
Use new PHPStan plugin
1 parent f24a6a8 commit 84ad6a8

File tree

4 files changed

+48
-45
lines changed

4 files changed

+48
-45
lines changed

.phpstan.dist.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
includes:
2-
- vendor/macopedia/phpstan-magento1/extension.neon
2+
- vendor/mahocommerce/maho-phpstan-plugin/extension.neon
33
- .phpstan.dist.baseline.neon
44
- phar://phpstan.phar/conf/bleedingEdge.neon
55
parameters:
66
magentoRootPath: %currentWorkingDirectory%
7+
bootstrapFiles:
8+
- app/Mage.php
79
fileExtensions:
810
- php
911
- phtml

app/Mage.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1414
*/
1515

16-
define('DS', DIRECTORY_SEPARATOR);
17-
define('PS', PATH_SEPARATOR);
16+
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
17+
defined('PS') || define('PS', PATH_SEPARATOR);
18+
1819
define('BP', dirname(__DIR__));
1920

2021
Mage::register('original_include_path', get_include_path());

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"AFL-3.0"
77
],
88
"type": "magento-source",
9+
"repositories": [
10+
{ "type": "git", "url": "https://github.com/justinbeaty/maho-phpstan-plugin.git" }
11+
],
912
"require": {
1013
"php": ">=7.4 <8.5",
1114
"ext-ctype": "*",
@@ -47,8 +50,8 @@
4750
"composer/composer": "^2.7",
4851
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
4952
"friendsofphp/php-cs-fixer": "^3.4",
50-
"macopedia/phpstan-magento1": "^1.0.5",
5153
"magento-ecg/coding-standard": "^4.5",
54+
"mahocommerce/maho-phpstan-plugin": "dev-topic-v3",
5255
"openmage/dev-meta-package": "^1.0.5",
5356
"perftools/php-profiler": "^1.1",
5457
"phpcompatibility/php-compatibility": "^9.3",

composer.lock

Lines changed: 38 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)