Skip to content

Commit c8ff866

Browse files
committed
Remove MagentoCore class
1 parent 4d07c88 commit c8ff866

14 files changed

+305
-852
lines changed

.gitignore

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
/composer.lock
2-
/vendor/
3-
.idea
1+
# PhpStorm
2+
.idea
3+
4+
# composer
5+
/vendor
6+
7+
# PhpStan
8+
.phpstan*.neon
9+
phpstan*.neon
10+
!.phpstan.dist.neon
11+
!.phpstan.dist.*.neon

.phpstan.dist.neon

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
includes:
2+
- vendor/phpstan/phpstan-strict-rules/rules.neon
3+
parameters:
4+
scanFiles:
5+
- stubs/mock.stub
6+
paths:
7+
- src
8+
level: 10

composer.json

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
{
22
"name": "macopedia/phpstan-magento1",
33
"description": "Extension for PHPStan to allow analysis of Magento 1 code.",
4-
"type": "library",
4+
"type": "phpstan-extension",
5+
"license": "MIT",
56
"require": {
6-
"phpstan/phpstan": "^1.12.11 | ^2.0.2",
77
"php": ">= 7.4"
88
},
9-
"replace": {
10-
"inviqa/phpstan-magento1": "0.1.5",
11-
"vianetz/phpstan-magento1": "0.1.5"
9+
"require-dev": {
10+
"phpstan/phpstan": "^2.0",
11+
"phpstan/phpstan-strict-rules": "^2.0"
1212
},
1313
"autoload": {
1414
"psr-4": {
1515
"PHPStanMagento1\\": "src/"
1616
}
1717
},
18+
"replace": {
19+
"inviqa/phpstan-magento1": "0.1.5",
20+
"vianetz/phpstan-magento1": "0.1.5"
21+
},
1822
"scripts": {
1923
"test-quality": [
2024
"phpstan analyse"
@@ -23,5 +27,11 @@
2327
"@test-quality"
2428
]
2529
},
26-
"license": "MIT"
30+
"extra": {
31+
"phpstan": {
32+
"includes": [
33+
"extension.neon"
34+
]
35+
}
36+
}
2737
}

composer.lock

+127
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extension-mage-autoload.neon

-88
This file was deleted.

extension.neon

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
parametersSchema:
22
magentoRootPath: string()
33
enforceMagicMethodDocBlock: bool()
4+
useLocalXml: bool()
45
parameters:
56
magentoRootPath: %currentWorkingDirectory%/htdocs
67
enforceMagicMethodDocBlock: false
7-
excludePaths:
8-
- */app/code/local/*/*/data/*
9-
- */app/code/local/*/*/sql/*
8+
useLocalXml: false
109
bootstrapFiles:
11-
- phpstan-bootstrap.php
12-
scanFiles:
13-
- %magentoRootPath%/app/Mage.php
14-
typeAliases:
15-
Mage_Catalog_Model_Entity_Product_Collection: 'Mage_Catalog_Model_Resource_Product_Collection'
16-
callback: 'callable'
17-
earlyTerminatingMethodCalls:
18-
Mage:
19-
- throwException
10+
- %currentWorkingDirectory%/app/Mage.php
2011

2112
services:
2213
mageCoreConfig:
2314
class: PHPStanMagento1\Config\MageCoreConfig
15+
arguments:
16+
useLocalXml: %useLocalXml%
2417

2518
## Dynamic Return Type Extension to return correct class from Mage::getModel() etc
2619
-

phpstan-bootstrap-mage-autoload.php

-42
This file was deleted.

0 commit comments

Comments
 (0)