From c6924f5b314de224a720a0e4ebc96bc27afa6310 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Fri, 14 May 2021 11:01:03 +0200 Subject: [PATCH] Drop Phing for Makefile See https://github.com/phpstan/phpstan-symfony/pull/160 --- .gitattributes | 12 ++++- .github/workflows/build.yml | 8 ++-- .gitignore | 1 + Makefile | 19 ++++++++ build-cs/composer.json | 2 +- build.xml | 90 ------------------------------------- composer.json | 1 - phpcs.xml | 9 +++- tmp/.gitignore | 3 ++ tmp/cache/.gitignore | 2 + 10 files changed, 49 insertions(+), 98 deletions(-) create mode 100644 Makefile delete mode 100644 build.xml create mode 100644 tmp/.gitignore create mode 100644 tmp/cache/.gitignore diff --git a/.gitattributes b/.gitattributes index 74a4e86..613f4d0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,11 @@ -/e2e export-ignore +*.php text eol=lf + +.github export-ignore +e2e export-ignore +tmp export-ignore +.gitattributes export-ignore +.gitignore export-ignore +Makefile export-ignore +phpcs.xml export-ignore +phpstan.neon export-ignore +phpunit.xml export-ignore diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8080ef2..5026608 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: run: "composer install --no-interaction --no-progress --no-suggest" - name: "Lint" - run: "vendor/bin/phing lint" + run: "make lint" coding-standards: name: "Coding Standard" @@ -63,10 +63,10 @@ jobs: run: "composer install --no-interaction --no-progress --no-suggest" - name: "Lint" - run: "vendor/bin/phing lint" + run: "make lint" - name: "Coding Standard" - run: "vendor/bin/phing cs" + run: "make cs" static-analysis: name: "PHPStan" @@ -110,4 +110,4 @@ jobs: run: "composer require --dev phpstan/phpstan:'^0.12.60' --update-with-dependencies" - name: "PHPStan" - run: "vendor/bin/phing phpstan" + run: "make phpstan" diff --git a/.gitignore b/.gitignore index aa2e6a2..a81f273 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /src/GeneratedConfig.php /vendor composer.lock +.phpunit.result.cache diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f0ad49d --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +.PHONY: check +check: lint cs phpstan + +.PHONY: lint +lint: + php vendor/bin/parallel-lint --colors \ + src + +.PHONY: cs +cs: + composer install --working-dir build-cs && php build-cs/vendor/bin/phpcs + +.PHONY: cs-fix +cs-fix: + php build-cs/vendor/bin/phpcbf + +.PHONY: phpstan +phpstan: + php vendor/bin/phpstan analyse -l 7 -c phpstan.neon src diff --git a/build-cs/composer.json b/build-cs/composer.json index 9acd027..ed7744e 100644 --- a/build-cs/composer.json +++ b/build-cs/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "consistence/coding-standard": "^3.10", + "consistence-community/coding-standard": "^3.10", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "slevomat/coding-standard": "^6.4" } diff --git a/build.xml b/build.xml deleted file mode 100644 index 944a726..0000000 --- a/build.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/composer.json b/composer.json index 7155522..43237fa 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,6 @@ }, "require-dev": { "composer/composer": "^2.0", - "phing/phing": "^2.16.3", "php-parallel-lint/php-parallel-lint": "^1.2.0", "phpstan/phpstan-strict-rules": "^0.11 || ^0.12" }, diff --git a/phpcs.xml b/phpcs.xml index 7e07a35..3989254 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,6 +1,13 @@ - + + + + + + + src + diff --git a/tmp/.gitignore b/tmp/.gitignore new file mode 100644 index 0000000..37890ca --- /dev/null +++ b/tmp/.gitignore @@ -0,0 +1,3 @@ +* +!cache +!.* diff --git a/tmp/cache/.gitignore b/tmp/cache/.gitignore new file mode 100644 index 0000000..125e342 --- /dev/null +++ b/tmp/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.*