signifly / php-config
Signifly PHP Config
Installs: 10 153
Dependents: 5
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^7.4||^8.0
- friendsofphp/php-cs-fixer: ^3.0
This package is auto-updated.
Last update: 2024-10-07 19:36:09 UTC
README
This repository contains the default configuration files for various services.
Code formatting
We use php-cs-fixer to format our code in order to standardize the styling across projects. There should be a plugin that formats the file on save to the most popular editors, such as: VS Code, Sublime Text, PHP Storm
Optionally, add the following to the scripts section in the project's composer.json file:
"format": [ "vendor/bin/php-cs-fixer fix" ],
This allows you to run composer format
from your terminal to format the entire code base.
Usage
Install the package by pulling it in from Composer:
composer require signifly/php-config --dev
Then update the .php-cs-fixer.php
file:
$finder = (new PhpCsFixer\Finder) ->notPath('bootstrap') ->notPath('storage') ->notPath('vendor') ->notPath('docker') ->in(getcwd()) ->name('*.php') ->notName('*.blade.php') ->notName('index.php') ->notName('server.php') ->ignoreDotFiles(true) ->ignoreVCS(true); return Signifly\styles($finder);
Remember to update the Finder
according to the project setup.