Skip to content

Drop Phing for Makefile #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
*.abnf text eol=crlf
*.php text eol=lf

/tests export-ignore
/doc/grammars export-ignore
/build-cs export-ignore
.github export-ignore
build-cs export-ignore
doc/grammars export-ignore
tests export-ignore
tmp export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.editorconfig export-ignore
.github export-ignore
build.xml export-ignore
phpcs.xml export-ignore
build.xml export-ignore
phpstan.neon export-ignore
build-abnfgen.sh export-ignore
CODE_OF_CONDUCT.md 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: "makea 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: "makea lint"

- name: "Coding Standard"
run: "vendor/bin/phing cs"
run: "makea cs"

tests:
name: "Tests"
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies"

- name: "Tests"
run: "vendor/bin/phing tests"
run: "makea tests"

static-analysis:
name: "PHPStan"
Expand Down Expand Up @@ -149,4 +149,4 @@ jobs:
run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies"

- name: "PHPStan"
run: "vendor/bin/phing phpstan"
run: "makea phpstan"
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/temp
/tools
/tests/tmp
/vendor

/composer.lock
composer.lock
.phpunit.result.cache
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.PHONY: check
check: build-abnfgen lint cs tests phpstan

.PHONY: tests
tests:
php vendor/bin/phpunit

.PHONY: lint
lint:
php vendor/bin/parallel-lint --colors \
src tests \
--exclude tests/PHPStan/Analyser/data \
--exclude tests/PHPStan/Rules/Methods/data \
--exclude tests/PHPStan/Rules/Functions/data

.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 5 -c phpstan.neon src tests

.PHONY: build-abnfgen
build-abnfgen:
./build-abnfgen.sh
136 changes: 0 additions & 136 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 @@ -6,7 +6,6 @@
"php": "^7.1 || ^8.0"
},
"require-dev": {
"phing/phing": "^2.16.3",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.60",
Expand Down
8 changes: 8 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<?xml version="1.0"?>
<ruleset name="PHPStan PHPDoc Parser">
<config name="php_version" value="70100"/>
<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>
<file>tests</file>
<rule ref="build-cs/vendor/consistence-community/coding-standard/Consistence/ruleset.xml">
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat"/>
<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 PHPDoc Parser">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>

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

This file was deleted.

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 @@
*
!.*