pantry/projects/symfony.com/cs/package.yml
2024-03-14 13:17:37 -04:00

30 lines
753 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

distributable: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/{{version.tag}}/php-cs-fixer.phar
versions:
github: PHP-CS-Fixer/PHP-CS-Fixer
warnings:
- vendored
dependencies:
php.net: '>=7.4'
build:
- install -D symfony.comcs-{{version}}.phar {{prefix}}/libexec/lib/php-cs-fixer.phar
- run: |
cat > php-cs-fixer <<EOF
#!/bin/sh
exec php \$(dirname \$0)/../libexec/lib/php-cs-fixer.phar "\$@"
EOF
chmod +x php-cs-fixer
working-directory: ${{prefix}}/bin
provides:
- bin/php-cs-fixer
test:
- php-cs-fixer --version | grep {{version}}
- echo "<?php \$this->foo( 'Hello World!' );" > test.php
- php-cs-fixer fix test.php
- cat test.php | grep "\$this->foo('Hello World!');"