descom / dev
Package to PHP Developer projects in Descom.es
Installs: 1 118
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 0
Requires
- php: ^8.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.35
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.5|^10.0|^10.5
Suggests
- friendsofphp/php-cs-fixer: Required to apply styles
README
Install
Via Composer
composer require --dev descom/dev
Usage
PHP CS Fixer
Using setup.sh
bash <(curl -Ls https://raw.githubusercontent.com/descom-es/php-dev/master/setup.sh)
Manually
Install php-cs-fixer.
composer require --dev friendsofphp/php-cs-fixer
Create file .php-cs-fixer.dist.php
in root project with content:
<?php $finder = Symfony\Component\Finder\Finder::create() ->in([ __DIR__.'/src', __DIR__.'/tests', ]) ->name('*.php') ->notName('*.blade.php') ->ignoreDotFiles(true) ->ignoreVCS(true); return (new PhpCsFixer\Config()) ->setRules(Descom\Dev\CsFixer::rules()) ->setFinder($finder);
Configure PHP CS Fixer in VS Code
Install extension PHP CS Fixer
With this settings:
{ "php-cs-fixer.onsave": true, "php-cs-fixer.executablePath": "${workspaceFolder}/vendor/bin/php-cs-fixer" }