Skip to content

Commit

Permalink
Drop Phing for Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed May 13, 2021
1 parent 7f47026 commit 7baaad1
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 145 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tests 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
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:


- name: "Lint"
run: "vendor/bin/phing lint"
run: "make lint"

coding-standards:
name: "Coding Standard"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/tests/tmp
/vendor
composer.lock
.phpunit.result.cache
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
108 changes: 0 additions & 108 deletions build.xml

This file was deleted.

7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
"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",
"phpunit/phpunit": "^7.5.20",
"phpunit/phpunit": "^9.5",
"symfony/config": "^4.2 || ^5.0",
"symfony/console": "^4.0 || ^5.0",
"symfony/framework-bundle": "^4.4 || ^5.0",
Expand All @@ -35,8 +34,8 @@
},
"config": {
"platform": {
"php": "7.4.6"
},
"php": "7.4.6"
},
"sort-packages": true
},
"extra": {
Expand Down
7 changes: 7 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?xml version="1.0"?>
<ruleset name="PHPStan PHPUnit extensions and rules">
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="encoding" value="utf-8"/>
<arg name="tab-width" value="4"/>
<arg value="sp"/>
<file>src</file>
<file>tests</file>
<rule ref="build-cs/vendor/consistence-community/coding-standard/Consistence/ruleset.xml">
<exclude name="Squiz.Functions.GlobalFunction.Found"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/>
Expand Down
36 changes: 36 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="tests/bootstrap.php"
colors="true"
backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="tests/tmp/clover.xml"/>
<text
outputFile="php://stdout"
showUncoveredFiles="true"
showOnlySummary="true"
/>
</report>
</coverage>

<testsuites>
<testsuite name="PHPStan for Symfony">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>

<logging/>
</phpunit>
27 changes: 0 additions & 27 deletions tests/phpunit.xml

This file was deleted.

0 comments on commit 7baaad1

Please sign in to comment.