Skip to content

Commit 11b5a11

Browse files
authored
minor #59 [dx] keep tooling in one place
- `composer tools:run` runs `php-cs-fixer` & `phpstan` - `composer tools:run:php-cs-fixer` run only `php-cs-fixer` (works for `phpstan` as well). - `composer tools:upgrade` upgrades / installs all of the `tools/*` - `composer tools:upgrade:php-cs-fixer` Upgrades / installs only `php-cs-fixer` (works for `phpstan` as well)
1 parent 61d6d35 commit 11b5a11

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

composer.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"require-dev": {
2222
"symfony/filesystem": "^6.3|^7.0",
2323
"symfony/framework-bundle": "^6.3|^7.0",
24-
"symfony/phpunit-bridge": "^6.3|^7.0",
25-
"phpstan/phpstan": "1.11.x-dev"
24+
"symfony/phpunit-bridge": "^6.3|^7.0"
2625
},
2726
"minimum-stability": "dev",
2827
"autoload": {
@@ -34,5 +33,19 @@
3433
"psr-4": {
3534
"Symfonycasts\\TailwindBundle\\Tests\\": "tests/"
3635
}
36+
},
37+
"scripts": {
38+
"tools:upgrade": [
39+
"@tools:upgrade:php-cs-fixer",
40+
"@tools:upgrade:phpstan"
41+
],
42+
"tools:upgrade:php-cs-fixer": "composer upgrade -W -d tools/php-cs-fixer",
43+
"tools:upgrade:phpstan": "composer upgrade -W -d tools/phpstan",
44+
"tools:run": [
45+
"@tools:run:php-cs-fixer",
46+
"@tools:run:phpstan"
47+
],
48+
"tools:run:php-cs-fixer": "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix",
49+
"tools:run:phpstan": "tools/phpstan/vendor/bin/phpstan --memory-limit=1G"
3750
}
3851
}

tools/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/vendor
2+
**/composer.lock

tools/php-cs-fixer/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"friendsofphp/php-cs-fixer": "^3"
4+
}
5+
}

tools/phpstan/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"phpstan/phpstan": "^1"
4+
}
5+
}

0 commit comments

Comments
 (0)