Skip to content

Commit

Permalink
Updated Phing to 3.0 (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
sturkel89 authored Jul 17, 2024
1 parent 0b6c558 commit beed760
Show file tree
Hide file tree
Showing 3 changed files with 667 additions and 298 deletions.
36 changes: 27 additions & 9 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,51 @@

<!-- PHP CodeSniffer -->
<target name="phpcbf">
<exec command="${srcdir}/vendor/bin/phpcbf --standard=${srcdir}/tests/phpcs.xml" escape="false" passthru="true" checkreturn="true" />
<exec executable="${srcdir}/vendor/bin/phpcbf" escape="false" passthru="true" checkreturn="true">
<arg line="--standard=${srcdir}/tests/phpcs.xml" />
</exec>
</target>
<target name="phpcs">
<exec command="${srcdir}/vendor/bin/phpcs --standard=${srcdir}/tests/phpcs.xml --report=checkstyle &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
<exec executable="${srcdir}/vendor/bin/phpcs" escape="false">
<arg line="--standard=${srcdir}/tests/phpcs.xml --report=checkstyle &gt; ${builddir}/reports/checkstyle.xml" />
</exec>
</target>
<target name="phpcs-console">
<exec command="${srcdir}/vendor/bin/phpcs --standard=${srcdir}/tests/phpcs.xml" escape="false" passthru="true" checkreturn="true" />
<exec executable="${srcdir}/vendor/bin/phpcs" escape="false" passthru="true" checkreturn="true">
<arg line="--standard=${srcdir}/tests/phpcs.xml" />
</exec>
</target>

<!-- php-cs-fixer (first task applies fixes, second task simply checks if they are needed) -->
<target name="php-cs-fixer">
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix --config=${srcdir}/tests/gbdb.php-cs-fixer.php --verbose" passthru="true" escape="false" />
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix --config=${srcdir}/tests/gbdb_templates.php-cs-fixer.php --verbose" passthru="true" escape="false" />
<exec executable="${srcdir}/vendor/bin/php-cs-fixer" passthru="true" escape="false">
<arg line="fix --config=${srcdir}/tests/gbdb.php-cs-fixer.php --verbose" />
</exec>
<exec executable="${srcdir}/vendor/bin/php-cs-fixer" passthru="true" escape="false">
<arg line="fix --config=${srcdir}/tests/gbdb_templates.php-cs-fixer.php --verbose" />
</exec>
</target>
<target name="php-cs-fixer-dryrun">
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix --config=${srcdir}/tests/gbdb.php-cs-fixer.php --dry-run --verbose --diff" passthru="true" escape="false" checkreturn="true" />
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix --config=${srcdir}/tests/gbdb_templates.php-cs-fixer.php --dry-run --verbose --diff" passthru="true" escape="false" checkreturn="true" />
<exec executable="${srcdir}/vendor/bin/php-cs-fixer" passthru="true" escape="false" checkreturn="true">
<arg line="fix --config=${srcdir}/tests/gbdb.php-cs-fixer.php --dry-run --verbose --diff" />
</exec>
<exec executable="${srcdir}/vendor/bin/php-cs-fixer" passthru="true" escape="false" checkreturn="true">
<arg line="fix --config=${srcdir}/tests/gbdb_templates.php-cs-fixer.php --dry-run --verbose --diff" />
</exec>
</target>

<!-- Set up dependencies -->
<target name="startup" description="set up dependencies">
<exec command="composer install" />
<exec executable="composer">
<arg line="install" />
</exec>
</target>

<!-- Clean up -->
<target name="shutdown" description="clean up file system">
<delete dir="${srcdir}/vendor" includeemptydirs="true" failonerror="true" />
<exec command="git reset --hard" />
<exec command="git">
<arg line="reset --hard" />
</exec>
</target>
</project>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.52.0",
"phing/phing": "^2.17.3",
"phing/phing": "3.0",
"squizlabs/php_codesniffer": "^3.7.0"
}
}
Loading

0 comments on commit beed760

Please sign in to comment.