Skip to content

Commit

Permalink
Remove MagentoCore class
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbeaty committed Dec 26, 2024
1 parent 4d07c88 commit c8ff866
Show file tree
Hide file tree
Showing 14 changed files with 305 additions and 852 deletions.
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/composer.lock
/vendor/
.idea
# PhpStorm
.idea

# composer
/vendor

# PhpStan
.phpstan*.neon
phpstan*.neon
!.phpstan.dist.neon
!.phpstan.dist.*.neon
8 changes: 8 additions & 0 deletions .phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
parameters:
scanFiles:
- stubs/mock.stub
paths:
- src
level: 10
22 changes: 16 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"name": "macopedia/phpstan-magento1",
"description": "Extension for PHPStan to allow analysis of Magento 1 code.",
"type": "library",
"type": "phpstan-extension",
"license": "MIT",
"require": {
"phpstan/phpstan": "^1.12.11 | ^2.0.2",
"php": ">= 7.4"
},
"replace": {
"inviqa/phpstan-magento1": "0.1.5",
"vianetz/phpstan-magento1": "0.1.5"
"require-dev": {
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0"
},
"autoload": {
"psr-4": {
"PHPStanMagento1\\": "src/"
}
},
"replace": {
"inviqa/phpstan-magento1": "0.1.5",
"vianetz/phpstan-magento1": "0.1.5"
},
"scripts": {
"test-quality": [
"phpstan analyse"
Expand All @@ -23,5 +27,11 @@
"@test-quality"
]
},
"license": "MIT"
"extra": {
"phpstan": {
"includes": [
"extension.neon"
]
}
}
}
127 changes: 127 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 0 additions & 88 deletions extension-mage-autoload.neon

This file was deleted.

17 changes: 5 additions & 12 deletions extension.neon
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
parametersSchema:
magentoRootPath: string()
enforceMagicMethodDocBlock: bool()
useLocalXml: bool()
parameters:
magentoRootPath: %currentWorkingDirectory%/htdocs
enforceMagicMethodDocBlock: false
excludePaths:
- */app/code/local/*/*/data/*
- */app/code/local/*/*/sql/*
useLocalXml: false
bootstrapFiles:
- phpstan-bootstrap.php
scanFiles:
- %magentoRootPath%/app/Mage.php
typeAliases:
Mage_Catalog_Model_Entity_Product_Collection: 'Mage_Catalog_Model_Resource_Product_Collection'
callback: 'callable'
earlyTerminatingMethodCalls:
Mage:
- throwException
- %currentWorkingDirectory%/app/Mage.php

services:
mageCoreConfig:
class: PHPStanMagento1\Config\MageCoreConfig
arguments:
useLocalXml: %useLocalXml%

## Dynamic Return Type Extension to return correct class from Mage::getModel() etc
-
Expand Down
42 changes: 0 additions & 42 deletions phpstan-bootstrap-mage-autoload.php

This file was deleted.

Loading

0 comments on commit c8ff866

Please sign in to comment.