-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from pluswerk/feature/new-config-handling
- Loading branch information
Showing
12 changed files
with
552 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/composer.lock | ||
|
||
.idea | ||
var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,62 @@ | ||
{ | ||
"name": "pluswerk/grumphp-config", | ||
"description": "GrumPHP config for php projects(mainly TYPO3)", | ||
"type": "composer-plugin", | ||
"license": "LGPL-3.0-or-later", | ||
"authors": [ | ||
{ | ||
"name": "Matthias Vogel", | ||
"email": "matthias.vogel@pluswerk.ag", | ||
"homepage": "http://pluswerk.ag" | ||
} | ||
], | ||
"config": { | ||
"platform": { | ||
"php": "7.4" | ||
}, | ||
"preferred-install": { | ||
"pluswerk/grumphp-bom-task": "source", | ||
"pluswerk/grumphp-xliff-task": "source", | ||
"*": "dist" | ||
}, | ||
"allow-plugins": { | ||
"phpro/grumphp": true | ||
} | ||
}, | ||
"support": { | ||
"issues": "https://github.com/pluswerk/grumphp-config/issues" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"PLUS\\": "src/" | ||
} | ||
}, | ||
"require": { | ||
"php": "~7.4 || ~8.0 || ~8.1", | ||
"composer-plugin-api": "^1.0.0 || ^2.0.0", | ||
"phpro/grumphp": "^1.5.1", | ||
"pluswerk/grumphp-bom-task": "^7.0.0", | ||
"pluswerk/grumphp-xliff-task": "^5.0.0", | ||
"squizlabs/php_codesniffer": "^3.6.2", | ||
"enlightn/security-checker": "^1.10.0", | ||
"php-parallel-lint/php-parallel-lint": "^1.3.2", | ||
"phpstan/phpstan": "^1.4.7" | ||
}, | ||
"extra": { | ||
"class": "PLUS\\Composer\\Plugin" | ||
"name" : "pluswerk/grumphp-config", | ||
"description" : "GrumPHP config for php projects(mainly TYPO3)", | ||
"type" : "composer-plugin", | ||
"license" : "LGPL-3.0-or-later", | ||
"authors" : [ | ||
{ | ||
"name" : "Matthias Vogel", | ||
"email" : "matthias.vogel@pluswerk.ag", | ||
"homepage" : "https://pluswerk.ag" | ||
} | ||
], | ||
"config" : { | ||
"preferred-install" : { | ||
"pluswerk/grumphp-bom-task" : "source", | ||
"pluswerk/grumphp-xliff-task" : "source", | ||
"*" : "dist" | ||
}, | ||
"require-dev": { | ||
"composer/composer": "^1.10.25 || ^2.2.7" | ||
"allow-plugins" : { | ||
"phpro/grumphp": true, | ||
"phpstan/extension-installer": true, | ||
"typo3/cms-composer-installers": true, | ||
"typo3/class-alias-loader": true | ||
} | ||
}, | ||
"support" : { | ||
"issues" : "https://github.com/pluswerk/grumphp-config/issues" | ||
}, | ||
"autoload" : { | ||
"psr-4" : { | ||
"PLUS\\GrumPHPConfig\\" : "src/" | ||
} | ||
}, | ||
"require" : { | ||
"php" : "~8.0 || ~8.1 || ~8.2", | ||
"composer-plugin-api" : "^2.1.0", | ||
"phpro/grumphp" : "^1.15", | ||
"pluswerk/grumphp-bom-task" : "^7.0.0", | ||
"pluswerk/grumphp-xliff-task" : "^5.0.0", | ||
"squizlabs/php_codesniffer" : "^3.7.1", | ||
"enlightn/security-checker" : "^1.10.0", | ||
"php-parallel-lint/php-parallel-lint" : "^1.3.2", | ||
"phpstan/phpstan" : "^1.8.8", | ||
"phpstan/extension-installer" : "^1.1", | ||
"rector/rector" : "^0.15.10", | ||
"composer/semver" : "^3.3.0", | ||
"symfony/yaml" : "^5.4.0 || ^6.0" | ||
}, | ||
"extra" : { | ||
"class" : "PLUS\\GrumPHPConfig\\Composer\\Plugin" | ||
}, | ||
"require-dev" : { | ||
"saschaegerer/phpstan-typo3" : "^1.8.2", | ||
"ssch/typo3-rector" : "^1.1.3", | ||
"roave/security-advisories" : "dev-latest", | ||
"composer/composer" : "^2.4.2" | ||
}, | ||
"require-typo3" : { | ||
"saschaegerer/phpstan-typo3" : "^1.8.2", | ||
"ssch/typo3-rector" : "^1.1.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Cannot access offset 'config\\-default\\-path' on mixed\\.$#" | ||
count: 1 | ||
path: src/Composer/Plugin.php | ||
|
||
- | ||
message: "#^Cannot access offset 'php' on mixed\\.$#" | ||
count: 1 | ||
path: src/VersionUtility.php | ||
|
||
- | ||
message: "#^Method PLUS\\\\GrumPHPConfig\\\\VersionUtility\\:\\:getRequire\\(\\) should return array\\<string, string\\> but returns mixed\\.$#" | ||
count: 1 | ||
path: src/VersionUtility.php | ||
|
||
- | ||
message: "#^Method PLUS\\\\GrumPHPConfig\\\\VersionUtility\\:\\:readJson\\(\\) should return array\\<string, mixed\\> but returns mixed\\.$#" | ||
count: 1 | ||
path: src/VersionUtility.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
|
||
parameters: | ||
stubFiles: | ||
- stubs/ConfigSourceInterface.stub | ||
level: max | ||
reportUnmatchedIgnoredErrors: false | ||
paths: | ||
- src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PLUS\GrumPHPConfig\RectorSettings; | ||
use Rector\Config\RectorConfig; | ||
use Rector\Caching\ValueObject\Storage\FileCacheStorage; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->parallel(); | ||
$rectorConfig->importNames(); | ||
$rectorConfig->importShortClasses(); | ||
$rectorConfig->cacheClass(FileCacheStorage::class); | ||
$rectorConfig->cacheDirectory('./var/cache/rector'); | ||
|
||
$rectorConfig->paths( | ||
array_filter([ | ||
is_dir(__DIR__ . '/src') ? __DIR__ . '/src' : null, | ||
is_dir(__DIR__ . '/extensions') ? __DIR__ . '/extensions' : null, | ||
is_dir(__DIR__ . '/Classes') ? __DIR__ . '/Classes' : null, | ||
]) | ||
); | ||
|
||
// define sets of rules | ||
$rectorConfig->sets( | ||
[ | ||
...RectorSettings::sets(true), | ||
...RectorSettings::setsTypo3(false), | ||
] | ||
); | ||
|
||
// remove some rules | ||
// ignore some files | ||
$rectorConfig->skip( | ||
[ | ||
...RectorSettings::skip(), | ||
...RectorSettings::skipTypo3(), | ||
|
||
/** | ||
* rector should not touch these files | ||
*/ | ||
//__DIR__ . '/src/Example', | ||
//__DIR__ . '/src/Example.php', | ||
] | ||
); | ||
}; |
Oops, something went wrong.