Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-grumphp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
strategy:
fail-fast: false
matrix:
package: ['grumphp-bom-task', 'grumphp-xliff-task', 'phpstan-git-files', 'rector-p']
package: ['grumphp-bom-task', 'grumphp-xliff-task', 'phpstan-git-files', 'rector-p', 'grumphp-fractor-task']
steps:
- uses: actions/checkout@v4
- run: ./split.sh ${{ matrix.package }}
21 changes: 13 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"composer-plugin-api": "^2.1.0",
"andersundsehr/phpstan-git-files": "^10.0.0",
"andersundsehr/rector-p": "^10.0.0",
"a9f/typo3-fractor": "^0.5.8",
"andersundsehr/grumphp-fractor-task": "^11.0.0",
"andersundsehr/phpstan-git-files": "^11.0.0",
"andersundsehr/rector-p": "^11.0.0",
"bnf/phpstan-psr-container": "^1.1.0",
"composer/semver": "^3.4.3",
"enlightn/security-checker": "^1.10.0 || ^2.0.0",
Expand All @@ -29,18 +31,19 @@
"phpro/grumphp": "^2.10.0",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^2.1.5",
"pluswerk/grumphp-bom-task": "^10.0.0",
"pluswerk/grumphp-xliff-task": "^10.0.0",
"pluswerk/grumphp-bom-task": "^11.0.0",
"pluswerk/grumphp-xliff-task": "^11.0.0",
"rector/rector": "^2.2.10",
"squizlabs/php_codesniffer": "^4.0.1",
"symfony/yaml": "^5.4.0 || ^6.4.18 || ^7.4.0"
},
"require-dev": {
"andersundsehr/phpstan-git-files": "dev-main as 10.0.0",
"andersundsehr/rector-p": "dev-main as 10.0.0",
"andersundsehr/grumphp-fractor-task": "dev-main as 11.0.0",
"andersundsehr/phpstan-git-files": "dev-main as 11.0.0",
"andersundsehr/rector-p": "dev-main as 11.0.0",
"composer/composer": "^2.8.5",
"pluswerk/grumphp-bom-task": "dev-main as 10.0.0",
"pluswerk/grumphp-xliff-task": "dev-main as 10.0.0",
"pluswerk/grumphp-bom-task": "dev-main as 11.0.0",
"pluswerk/grumphp-xliff-task": "dev-main as 11.0.0",
"roave/security-advisories": "dev-latest",
"symfony/var-dumper": "^5.4.0 || ^6.4.18 || ^7.0.0"
},
Expand All @@ -61,13 +64,15 @@
},
"config": {
"allow-plugins": {
"a9f/fractor-extension-installer": true,
"ergebnis/composer-normalize": true,
"phpro/grumphp": true,
"phpstan/extension-installer": true,
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true
},
"preferred-install": {
"andersundsehr/grumphp-fractor-task": "source",
"andersundsehr/phpstan-git-files": "source",
"pluswerk/grumphp-bom-task": "source",
"pluswerk/grumphp-xliff-task": "source",
Expand Down
16 changes: 16 additions & 0 deletions fractor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use a9f\Fractor\Configuration\FractorConfiguration;
use PLUS\GrumPHPConfig\FractorSettings;

return FractorConfiguration::configure()
->withPaths(array_filter(explode("\n", (string)shell_exec("git ls-files | xargs ls -d 2>/dev/null"))))
->withSets([
...FractorSettings::sets(true),
])
->withRules([
...FractorSettings::rules(),
])
->withOptions([
...FractorSettings::options(),
]);
4 changes: 2 additions & 2 deletions grumphp-run-all.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ for dir in $directories
do
cd $dir
# cleanup each package symlinks:
rm -rf vendor/pluswerk/grumphp-bom-task vendor/pluswerk/grumphp-xliff-task vendor/andersundsehr/phpstan-git-files vendor/andersundsehr/rector-p
rm -rf vendor/pluswerk/grumphp-bom-task vendor/andersundsehr/grumphp-fractor-task vendor/pluswerk/grumphp-xliff-task vendor/andersundsehr/phpstan-git-files vendor/andersundsehr/rector-p
done

for dir in $directories
Expand All @@ -27,7 +27,7 @@ do
# run the checks:
vendor/bin/grumphp run
# cleanup symlinks so that we can run the script again
rm -rf vendor/pluswerk/grumphp-bom-task vendor/pluswerk/grumphp-xliff-task vendor/andersundsehr/phpstan-git-files vendor/andersundsehr/rector-p
rm -rf vendor/pluswerk/grumphp-bom-task vendor/andersundsehr/grumphp-fractor-task vendor/pluswerk/grumphp-xliff-task vendor/andersundsehr/phpstan-git-files vendor/andersundsehr/rector-p
done

cd $CWD
Expand Down
12 changes: 12 additions & 0 deletions grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ parameters:
convention.rector_enabled: true
convention.rector_config: 'rector.php'
convention.rector_clear-cache: false
convention.fractor_ignore_pattern: []
convention.fractor_enable: true
convention.fractor_config: 'fractor.php'
convention.fractor_clear-cache: false
convention.phpstan_level: ~

grumphp:
Expand Down Expand Up @@ -68,8 +72,16 @@ grumphp:
triggered_by: [ 'php' ]
clear_cache: "%convention.rector_clear-cache%"
ignore_patterns: "%convention.rector_ignore_pattern%"
fractor:
metadata:
enabled: "%convention.fractor_enable%"
config: "%convention.fractor_config%"
triggered_by: [ 'php' ]
clear_cache: "%convention.fractor_clear-cache%"
ignore_patterns: "%convention.fractor_ignore_pattern%"
extensions:
- PLUS\GrumPHPBomTask\ExtensionLoader
- Andersundsehr\GrumPHPFractorTask\ExtensionLoader
- PLUS\GrumPHPXliffTask\ExtensionLoader
git_hook_variables:
# $DDEV_EXEC will be empty or be the path to ddev exec, so it will work in ddev projects and other projects. :) and inside and outside the ddev container.
Expand Down
4 changes: 3 additions & 1 deletion packages/grumphp-bom-task/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"phpro/grumphp": "^2.0.0"
},
"require-dev": {
"andersundsehr/grumphp-fractor-task": "@dev",
"andersundsehr/phpstan-git-files": "@dev",
"andersundsehr/rector-p": "@dev",
"pluswerk/grumphp-config": "@dev",
Expand Down Expand Up @@ -52,6 +53,7 @@
],
"config": {
"allow-plugins": {
"a9f/fractor-extension-installer": true,
"ergebnis/composer-normalize": true,
"phpro/grumphp": true,
"phpstan/extension-installer": true,
Expand All @@ -60,7 +62,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "10.0.x-dev"
"dev-main": "11.0.x-dev"
}
},
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions packages/grumphp-fractor-task/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/vendor/
composer.lock
var/
Loading