From 33993fba2cc2f80fffad48d88b5b09c6250d2677 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 3 Mar 2022 10:54:50 -0500 Subject: [PATCH] Simplify formatting tools setup --- .gitignore | 2 +- composer.json | 1 - composer.lock | 126 +------------------------ justfile | 8 +- symfony.lock | 6 -- tools/composer.json | 7 ++ tools/{php-cs-fixer => }/composer.lock | 126 ++++++++++++++++++++++++- tools/php-cs-fixer/composer.json | 6 -- 8 files changed, 138 insertions(+), 144 deletions(-) create mode 100644 tools/composer.json rename tools/{php-cs-fixer => }/composer.lock (94%) delete mode 100644 tools/php-cs-fixer/composer.json diff --git a/.gitignore b/.gitignore index bed9bb0..338017d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,6 @@ ###< phpunit/phpunit ### # PHP CS Fixer -tools/php-cs-fixer/vendor/ +tools/vendor/ /.php-cs-fixer.php /.php-cs-fixer.cache diff --git a/composer.json b/composer.json index 879dd19..67c3303 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,6 @@ }, "require-dev": { "phpunit/phpunit": "^9.5", - "rector/rector": "^0.12.16", "roave/security-advisories": "dev-master", "symfony/dotenv": "^6.0.3", "symfony/flex": "^2.1.6", diff --git a/composer.lock b/composer.lock index eec33ac..67a04c7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8180777612d8d58ad22454a822af2120", + "content-hash": "dbd4204be0a3d2c144aeb6270fc8baf5", "packages": [ { "name": "composer/package-versions-deprecated", @@ -6081,70 +6081,6 @@ }, "time": "2021-12-08T12:19:24+00:00" }, - { - "name": "phpstan/phpstan", - "version": "1.4.7", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "15087679960d72ae56bfcbf0d728d19941d3f7c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/15087679960d72ae56bfcbf0d728d19941d3f7c2", - "reference": "15087679960d72ae56bfcbf0d728d19941d3f7c2", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "support": { - "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.4.7" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" - } - ], - "time": "2022-03-02T16:04:01+00:00" - }, { "name": "phpunit/php-code-coverage", "version": "9.2.14", @@ -6566,66 +6502,6 @@ ], "time": "2022-02-23T17:10:58+00:00" }, - { - "name": "rector/rector", - "version": "0.12.17", - "source": { - "type": "git", - "url": "https://github.com/rectorphp/rector.git", - "reference": "4f32575b718a4d7032423dc8e9d1e530ad859782" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/4f32575b718a4d7032423dc8e9d1e530ad859782", - "reference": "4f32575b718a4d7032423dc8e9d1e530ad859782", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0", - "phpstan/phpstan": "^1.4.6" - }, - "conflict": { - "phpstan/phpdoc-parser": "<1.2", - "rector/rector-cakephp": "*", - "rector/rector-doctrine": "*", - "rector/rector-laravel": "*", - "rector/rector-nette": "*", - "rector/rector-phpoffice": "*", - "rector/rector-phpunit": "*", - "rector/rector-prefixed": "*", - "rector/rector-symfony": "*" - }, - "bin": [ - "bin/rector" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "0.12-dev" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Instant Upgrade and Automated Refactoring of any PHP code", - "support": { - "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.12.17" - }, - "funding": [ - { - "url": "https://github.com/tomasvotruba", - "type": "github" - } - ], - "time": "2022-03-03T12:18:11+00:00" - }, { "name": "roave/security-advisories", "version": "dev-master", diff --git a/justfile b/justfile index 28ec231..d5550cf 100644 --- a/justfile +++ b/justfile @@ -4,16 +4,16 @@ default: # Runs rector, showing what changes will be make rector-dry-run: - vendor/bin/rector process --config=tools/rector.php --dry-run src tools + tools/vendor/bin/rector process --config=tools/rector.php --dry-run src # Runs rector, and updates the files rector: - vendor/bin/rector process --config=tools/rector.php src tools + tools/vendor/bin/rector process --config=tools/rector.php src # Check code formatting check-fmt: - tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --verbose + tools/vendor/bin/php-cs-fixer fix --dry-run --verbose # Fix code formatting fmt: - tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --verbose + tools/vendor/bin/php-cs-fixer fix --verbose diff --git a/symfony.lock b/symfony.lock index 5095a96..2e0dc21 100644 --- a/symfony.lock +++ b/symfony.lock @@ -114,9 +114,6 @@ "phpspec/prophecy": { "version": "v1.15.0" }, - "phpstan/phpstan": { - "version": "1.4.6" - }, "phpunit/php-code-coverage": { "version": "9.2.10" }, @@ -158,9 +155,6 @@ "psr/log": { "version": "1.1.3" }, - "rector/rector": { - "version": "0.12.16" - }, "roave/security-advisories": { "version": "dev-master" }, diff --git a/tools/composer.json b/tools/composer.json new file mode 100644 index 0000000..84d4b49 --- /dev/null +++ b/tools/composer.json @@ -0,0 +1,7 @@ +{ + "require": { + "codeigniter/coding-standard": "^1.4", + "friendsofphp/php-cs-fixer": "^3.6", + "rector/rector": "^0.12.16" + } +} diff --git a/tools/php-cs-fixer/composer.lock b/tools/composer.lock similarity index 94% rename from tools/php-cs-fixer/composer.lock rename to tools/composer.lock index 275b6c0..13cd4f7 100644 --- a/tools/php-cs-fixer/composer.lock +++ b/tools/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fb2f64263089ac10ffa172721a763924", + "content-hash": "c378e5e1c8955dd6dd8351e352ad418a", "packages": [ { "name": "codeigniter/coding-standard", @@ -625,6 +625,70 @@ }, "time": "2020-10-14T08:32:19+00:00" }, + { + "name": "phpstan/phpstan", + "version": "1.4.7", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "15087679960d72ae56bfcbf0d728d19941d3f7c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/15087679960d72ae56bfcbf0d728d19941d3f7c2", + "reference": "15087679960d72ae56bfcbf0d728d19941d3f7c2", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.4.7" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2022-03-02T16:04:01+00:00" + }, { "name": "psr/cache", "version": "3.0.0", @@ -827,6 +891,66 @@ }, "time": "2021-07-14T16:46:02+00:00" }, + { + "name": "rector/rector", + "version": "0.12.17", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "4f32575b718a4d7032423dc8e9d1e530ad859782" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/4f32575b718a4d7032423dc8e9d1e530ad859782", + "reference": "4f32575b718a4d7032423dc8e9d1e530ad859782", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0", + "phpstan/phpstan": "^1.4.6" + }, + "conflict": { + "phpstan/phpdoc-parser": "<1.2", + "rector/rector-cakephp": "*", + "rector/rector-doctrine": "*", + "rector/rector-laravel": "*", + "rector/rector-nette": "*", + "rector/rector-phpoffice": "*", + "rector/rector-phpunit": "*", + "rector/rector-prefixed": "*", + "rector/rector-symfony": "*" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.12-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/0.12.17" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2022-03-03T12:18:11+00:00" + }, { "name": "symfony/console", "version": "v6.0.5", diff --git a/tools/php-cs-fixer/composer.json b/tools/php-cs-fixer/composer.json deleted file mode 100644 index 2d97d92..0000000 --- a/tools/php-cs-fixer/composer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "require": { - "codeigniter/coding-standard": "^1.4", - "friendsofphp/php-cs-fixer": "^3.6" - } -}