faktore / fe-skeleton-coding-standards
Defines a common set for coding standards
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:fe-skeleton-extension
Requires
Suggests
- faktore/fe-skeleton-composer-installer: Used to evaluate dirmap/dirmapOnce instructions to place files in your project.
README
Coding Standards (phpstan, php-cs-fixer, php_sniffer, github build)
Also provides a render-action ".github/workflows/ci.yml.example" which uses a simple CI pipeline, and posting to slack.
Requires you to set a SLACK_WEBHOOK_URL secret to point to your Slack App integration.
Usage
Install as a dev dependency:
composer require-dev faktore/fe-skeleton-coding-standards
Composer Scripts
Check out the file composer.scripts.json
and place these in your existing
composer.json
project file.
The kickstarter in fe-skeleton-composer-templates
also provides this.
(Required composer packages are not allowed to insert custom scripts, that is the reason it cannot be done for you automatically)
Provided files
When being used in fe-skeleton context, this provides the following files.
ONCE, only if not existing:
These files are only imported once, and only if such a file is NOT yet existing.
On skeleton updates these are meant to NOT overwrite these files, because it assumes that your project configures them.
This is what happens through the "dirmapOnce" composer.json configuration that the skeleton-composer-installer evaluates.
These files are meant to be versioned in your project repository.
- phpstan-baseline.neon (project-specific baseline)
ALWAYS on updates:
These files will always be maintained in this repository, and every update to a new version will overwrite your files.
Your files are meant to be versioned in your project repository. If you plan to change things in these files, remove the "fe-skeleton-autogenerated" marker to do so.
Configuration
- phpcs.xml (PHP_CodeSniffer config)
- .php-cs-fixer.php (PHP-CS-Fixer config)
- phpstan.neon (phpstan config)
- .phpstorm.meta.php (PHPStorm helper)
- phpstorm.inspections.xml (PHPStorm inspections)
- .editorconfig
- .github/workflows/ci.yml (Workflow)
Provided applications/code
A simple Symfony CLI Console Command is provided as:
- vendor/faktore-git/fe-skeleton-coding-standards/Sniffy (inspection helper)
Reset script
rm phpcs.xml .php-cs-fixer.php phpstan.neon .phpstorm.meta.php phpstorm.inspections.xml .editorconfig .github/workflows/main.yml .github/workflows/ci.yml