new file: projects/symfony.com/cs/package.yml

This commit is contained in:
Andrii Riabchenko 2024-03-14 14:32:57 +02:00 committed by Jacob Heider
parent 121c560474
commit 835d684221

View file

@ -0,0 +1,29 @@
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!');"