Skip to content

Commit

Permalink
Drop Phing for Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal authored and ondrejmirtes committed May 14, 2021
1 parent 56b0aec commit c6924f5
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 98 deletions.
12 changes: 11 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/src/GeneratedConfig.php
/vendor
composer.lock
.phpunit.result.cache
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion build-cs/composer.json
Original file line number Diff line number Diff line change
@@ -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"
}
Expand Down
90 changes: 0 additions & 90 deletions build.xml

This file was deleted.

1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
9 changes: 8 additions & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<?xml version="1.0"?>
<ruleset name="PHPStan extension installer">
<rule ref="build-cs/vendor/consistence/coding-standard/Consistence/ruleset.xml">
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="encoding" value="utf-8"/>
<arg name="tab-width" value="4"/>
<arg name="cache" value="tmp/cache/phpcs"/>
<arg value="sp"/>
<file>src</file>
<rule ref="build-cs/vendor/consistence-community/coding-standard/Consistence/ruleset.xml">
<exclude name="Squiz.Functions.GlobalFunction.Found"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
Expand Down
3 changes: 3 additions & 0 deletions tmp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!cache
!.*
2 changes: 2 additions & 0 deletions tmp/cache/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.*

0 comments on commit c6924f5

Please sign in to comment.