diff --git a/.gitattributes b/.gitattributes index 823b5a81..17405d6e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,12 @@ *.php text eol=lf tests export-ignore +tmp export-ignore .coveralls.yml export-ignore .gitattributes export-ignore .gitignore export-ignore .travis.yml export-ignore -build.xml 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 fc0ee8f4..18898d7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: - name: "Lint" - run: "vendor/bin/phing lint" + run: "make lint" coding-standards: name: "Coding Standard" @@ -68,10 +68,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" tests: name: "Tests" @@ -116,7 +116,7 @@ jobs: run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies" - name: "Tests" - run: "vendor/bin/phing tests" + run: "make tests" static-analysis: name: "PHPStan" @@ -160,4 +160,4 @@ jobs: run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies" - name: "PHPStan" - run: "vendor/bin/phing phpstan" + run: "make phpstan" diff --git a/.gitignore b/.gitignore index ca398d28..d6a83e59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /tests/tmp /vendor composer.lock +.phpunit.result.cache diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..fe917d3b --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +.PHONY: check +check: lint cs tests phpstan + +.PHONY: tests +tests: + php vendor/bin/phpunit + +.PHONY: lint +lint: + php vendor/bin/parallel-lint --colors \ + src tests + +.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 8 -c phpstan.neon src tests diff --git a/build.xml b/build.xml deleted file mode 100644 index 75b98df1..00000000 --- a/build.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/composer.json b/composer.json index 4e01cb6b..6372b6cc 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,6 @@ "symfony/framework-bundle": "<3.0" }, "require-dev": { - "phing/phing": "^2.16.3", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan-phpunit": "^0.12.16", "phpstan/phpstan-strict-rules": "^0.12.5", @@ -35,8 +34,8 @@ }, "config": { "platform": { - "php": "7.4.6" - }, + "php": "7.4.6" + }, "sort-packages": true }, "extra": { diff --git a/phpcs.xml b/phpcs.xml index f6ec19e6..2807efec 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,5 +1,13 @@ + + + + + + + src + tests diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 00000000..f9f3afe2 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,36 @@ + + + + + ./src + + + + + + + + + + tests + + + + + diff --git a/tests/phpunit.xml b/tests/phpunit.xml deleted file mode 100644 index 738b4ac6..00000000 --- a/tests/phpunit.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - ../src - - - - - - - diff --git a/tmp/.gitignore b/tmp/.gitignore new file mode 100644 index 00000000..37890cae --- /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 00000000..125e3429 --- /dev/null +++ b/tmp/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.*