Skip to content

Commit

Permalink
Move tools' dependencies to separate utils directory
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Jul 23, 2024
1 parent 854c73f commit ed01a7e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 36 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ CONTRIBUTING.md export-ignore

# contributor/development files
tests/ export-ignore
tools/ export-ignore
utils/ export-ignore
.php-cs-fixer.dist.php export-ignore
.php-cs-fixer.no-header.php export-ignore
Expand Down
47 changes: 17 additions & 30 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,13 @@
"psr/log": "^3.0"
},
"require-dev": {
"codeigniter/coding-standard": "^1.7",
"codeigniter/phpstan-codeigniter": "^1.4",
"ergebnis/composer-normalize": "^2.28",
"fakerphp/faker": "^1.9",
"friendsofphp/php-cs-fixer": "^3.47.1",
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
"nexusphp/cs-config": "^3.6",
"nexusphp/tachycardia": "^2.0",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-strict-rules": "^1.6",
"phpunit/phpcov": "^9.0.2",
"phpunit/phpunit": "^10.5.16",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "1.2.1",
"vimeo/psalm": "^5.0"
"predis/predis": "^1.1 || ^2.0"
},
"replace": {
"codeigniter4/framework": "self.version"
Expand Down Expand Up @@ -71,15 +61,10 @@
},
"autoload-dev": {
"psr-4": {
"CodeIgniter\\": "tests/system/",
"Utils\\": "utils/"
"CodeIgniter\\": "tests/system/"
}
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true
},
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
Expand All @@ -90,30 +75,32 @@
}
},
"scripts": {
"post-autoload-dump": [
"@composer update --working-dir=utils"
],
"post-update-cmd": [
"CodeIgniter\\ComposerScripts::postUpdate",
"composer update --working-dir=tools/phpmetrics"
"CodeIgniter\\ComposerScripts::postUpdate"
],
"analyze": [
"Composer\\Config::disableProcessTimeout",
"bash -c \"XDEBUG_MODE=off phpstan analyse\"",
"rector process --dry-run"
"bash -c \"XDEBUG_MODE=off utils/vendor/bin/phpstan analyse\"",
"utils/vendor/bin/rector process --dry-run"
],
"cs": [
"Composer\\Config::disableProcessTimeout",
"php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php",
"php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.no-header.php",
"php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.tests.php",
"php-cs-fixer fix --ansi --verbose --dry-run --diff"
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php",
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.no-header.php",
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.tests.php",
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run --diff"
],
"cs-fix": [
"Composer\\Config::disableProcessTimeout",
"php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.user-guide.php",
"php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.no-header.php",
"php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.tests.php",
"php-cs-fixer fix --ansi --verbose --diff"
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.user-guide.php",
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.no-header.php",
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.tests.php",
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff"
],
"metrics": "tools/phpmetrics/vendor/bin/phpmetrics --config=phpmetrics.json",
"metrics": "utils/vendor/bin/phpmetrics --config=phpmetrics.json",
"sa": "@analyze",
"style": "@cs-fix",
"test": "phpunit"
Expand Down
5 changes: 0 additions & 5 deletions tools/phpmetrics/composer.json

This file was deleted.

30 changes: 30 additions & 0 deletions utils/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"require": {
"php": "^8.1",
"codeigniter/coding-standard": "^1.7",
"codeigniter/phpstan-codeigniter": "^1.4",
"ergebnis/composer-normalize": "^2.28",
"friendsofphp/php-cs-fixer": "^3.47.1",
"nexusphp/cs-config": "^3.6",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.11",
"phpmetrics/phpmetrics": "^2.8 || ^3.0rc6",
"phpstan/phpstan-strict-rules": "^1.6",
"rector/rector": "1.2.1",
"vimeo/psalm": "^5.0"
},
"autoload": {
"psr-4": {
"Utils\\": "src/"
}
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true
},
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
}
}

0 comments on commit ed01a7e

Please sign in to comment.