mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-11-29 20:19:16 +01:00
Drop Phing for Makefile
See https://github.com/phpstan/phpstan-symfony/pull/160
This commit is contained in:
parent
e188439875
commit
4530d56c35
20
.gitattributes
vendored
20
.gitattributes
vendored
@ -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
|
||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
/temp
|
||||
/tools
|
||||
/tests/tmp
|
||||
/vendor
|
||||
|
||||
/composer.lock
|
||||
composer.lock
|
||||
.phpunit.result.cache
|
||||
|
30
Makefile
Normal file
30
Makefile
Normal file
@ -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
build.xml
136
build.xml
@ -1,136 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project name="PHPStan PHPDoc Parser" default="check">
|
||||
|
||||
<target name="check" depends="
|
||||
composer-validate,
|
||||
composer-install,
|
||||
lint,
|
||||
cs,
|
||||
tests,
|
||||
phpstan
|
||||
"/>
|
||||
|
||||
<target name="composer-validate">
|
||||
<exec
|
||||
executable="composer"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="validate"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="composer-install">
|
||||
<exec
|
||||
executable="composer"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="install"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="lint">
|
||||
<exec
|
||||
executable="vendor/bin/parallel-lint"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="--exclude"/>
|
||||
<arg path="tests/PHPStan/Analyser/data"/>
|
||||
<arg value="--exclude"/>
|
||||
<arg path="tests/PHPStan/Rules/Methods/data"/>
|
||||
<arg value="--exclude"/>
|
||||
<arg path="tests/PHPStan/Rules/Functions/data"/>
|
||||
<arg path="src" />
|
||||
<arg path="tests" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="cs">
|
||||
<exec
|
||||
executable="composer"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="install"/>
|
||||
<arg value="--working-dir"/>
|
||||
<arg path="build-cs"/>
|
||||
<arg value="--ignore-platform-reqs"/>
|
||||
<arg value="--ansi"/>
|
||||
</exec>
|
||||
<exec
|
||||
executable="build-cs/vendor/bin/phpcs"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="--extensions=php"/>
|
||||
<arg value="--encoding=utf-8"/>
|
||||
<arg value="--tab-width=4"/>
|
||||
<arg value="--ignore=tests/*/data,tests/*/traits"/>
|
||||
<arg value="-sp"/>
|
||||
<arg path="src"/>
|
||||
<arg path="tests"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="cs-fix">
|
||||
<exec
|
||||
executable="build-cs/vendor/bin/phpcbf"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="--extensions=php"/>
|
||||
<arg value="--encoding=utf-8"/>
|
||||
<arg value="--tab-width=4"/>
|
||||
<arg value="--ignore=tests/*/data,tests/*/traits"/>
|
||||
<arg value="-sp"/>
|
||||
<arg path="src"/>
|
||||
<arg path="tests"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="tests" depends="build-abnfgen">
|
||||
<exec
|
||||
executable="vendor/bin/phpunit"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="-c"/>
|
||||
<arg value="tests/phpunit.xml"/>
|
||||
<arg path="tests"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="phpstan">
|
||||
<exec
|
||||
executable="vendor/bin/phpstan"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="analyse"/>
|
||||
<arg value="--level"/>
|
||||
<arg value="5"/>
|
||||
<arg path="src"/>
|
||||
<arg path="tests"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="build-abnfgen">
|
||||
<exec
|
||||
executable="./build-abnfgen.sh"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
@ -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",
|
||||
|
@ -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"/>
|
||||
|
36
phpunit.xml
Normal file
36
phpunit.xml
Normal file
@ -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>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.2/phpunit.xsd"
|
||||
bootstrap="bootstrap.php"
|
||||
colors="true"
|
||||
failOnRisky="true"
|
||||
failOnWarning="true"
|
||||
beStrictAboutChangesToGlobalState="true"
|
||||
beStrictAboutCoversAnnotation="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
beStrictAboutTodoAnnotatedTests="true"
|
||||
verbose="false">
|
||||
<testsuite>
|
||||
<directory suffix="Test.php">PHPStan</directory>
|
||||
</testsuite>
|
||||
</phpunit>
|
||||
|
3
tmp/.gitignore
vendored
Normal file
3
tmp/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*
|
||||
!cache
|
||||
!.*
|
2
tmp/cache/.gitignore
vendored
Normal file
2
tmp/cache/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.*
|
Loading…
Reference in New Issue
Block a user