eonx-com / easy-standard
Centralised source of coding standard classes
Installs: 30 602
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Open Issues: 0
Requires
- php: ^7.2
- symfony/dependency-injection: 5.1.10
Requires (Dev)
- phpstan/phpstan: ^0.12.42
- phpunit/phpunit: ^8.4 || ^9.5
- rector/rector: ^0.8.34
- slevomat/coding-standard: ^6.4
- symplify/easy-coding-standard-tester: ^8.3.41
- 3.x-dev
- dev-master / 3.1.x-dev
- 3.0.24
- 3.0.23
- 3.0.22
- 3.0.21
- 3.0.20
- 3.0.19
- 3.0.18
- 3.0.17
- 3.0.16
- 3.0.15
- 3.0.14
- 3.0.14-alpha3
- 3.0.14-alpha2
- 3.0.14-alpha1
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.5-alpha4
- 3.0.5-alpha3
- 3.0.5-alpha2
- 3.0.5-alpha1
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-alpha2
- 3.0.0-alpha1
- 2.5.33
- 2.5.32
- 2.5.31
- 2.5.30
- 2.5.29
- 2.5.28
- 2.5.27
- v2.5.26
- v2.5.25
- v2.5.24
- v2.5.23
- v2.5.22
- v2.5.21
- v2.5.20
- v2.5.19
- v2.5.18
- v2.5.17
- v2.5.16
- v2.5.15
- v2.5.14
- v2.5.13
- v2.5.12
- v2.5.11
- v2.5.10
- v2.5.9
- v2.5.8
- v2.5.7
- v2.5.6
- v2.5.5
- v2.5.4
- v2.5.3
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.49
- v2.4.48
- v2.4.47
- v2.4.46
- v2.4.45
- v2.4.44
- v2.4.43
- v2.4.42
- v2.4.41
- v2.4.40
- v2.4.39
- v2.4.38
- v2.4.37
- v2.4.36
- v2.4.35
- v2.4.34
- v2.4.33
- v2.4.32
- v2.4.31
- v2.4.30
- v2.4.29
- v2.4.28
- v2.4.27
- v2.4.26
- v2.4.25
- v2.4.24
- v2.4.23
- v2.4.22
- v2.4.21
- v2.4.20
- v2.4.19
- v2.4.18
- v2.4.17
- v2.4.16
- v2.4.15
- v2.4.14
- v2.4.13
- v2.4.12
- v2.4.11
- v2.4.10
- v2.4.9
- v2.4.8
- v2.4.7
- v2.4.6
- v2.4.5
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.17
- v2.3.16
- v2.3.15
- v2.3.14
- v2.3.13
- v2.3.12
- v2.3.11
- v2.3.10
- v2.3.9
- v2.3.8
- v2.3.7
- v2.3.6
- v2.3.5
- dev-feature/git-subtree-for-split-1
- dev-feature/git-subtree-for-split
- dev-feature/easy-async-refactor
- dev-3.x-split-test
- dev-feature/exception-to-status-code
- dev-feature/easy-request-id
- dev-feature/easy-bugsnag
- dev-feature/error-handler-framework-agnostic
- dev-integration/easy-api-token-and-easy-security
- dev-feature/easy-webhook-profiler
- dev-feature/easy-webhooks
- dev-feature/refactory-easy-api-token
- dev-feature/search-in-easy-core
- dev-feature/aws-credentials-finder
- dev-feature/aws-sso-access-token
- dev-feature/refactor-easy-security
- dev-feature/improve-data-persister-structure
- dev-hotfix/data-persister-decoration-priority
- dev-feature/improve-easy-ssm-console-export
- dev-feature/make-commands
- dev-feature/persister-route-paremeters-aware
- dev-feature/auto-configure-doctrine-listeners
- dev-feature/enhance-api-platform
- dev-whitesource/configure
This package is auto-updated.
Last update: 2021-12-30 07:23:11 UTC
README
---eonx_docs--- title: Introduction weight: 0 ---eonx_docs---
This package is a way to centralise reusable classes used for coding standards. It contains:
Require package (Composer)
We recommend using Composer to manage your dependencies. You can require this package as follows:
$ composer require --dev eonx/easy-standard
Prepare configuration file for ECS (Easy Coding Standard) Sniffs
You can use one of the following names for a configuration file: ecs.php
, ecs.yml
, ecs.yaml
, easy-coding-standard.yml
, or easy-coding-standard.yaml
. Create this file in the root folder of the project.
Note: The YAML configuration is deprecated in the new ECS versions. Use the PHP configuration if possible.
The basic structure of the configuration file follows:
// ecs.php declare(strict_types=1); use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); /* * List of parameters */ $services = $containerConfigurator->services(); /* * List of services */ };
# ecs.yml parameters: # List of parameters services: # List of services
Run ECS check
Go to the root folder of the project and run
vendor/bin/ecs check
Expected output:
[OK] No errors found. Great job - your code is shiny in style!
Prepare configuration file for Rector
You can use one of the following names for a configuration file: rector.php
, rector.yml
or rector.yaml
. Create this file in the root folder of the project.
Note: The YAML configuration is deprecated in the new Rector versions. Use the PHP configuration if possible.
The basic structure of the configuration file follows:
// rector.php declare(strict_types=1); use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); /* * List of parameters */ $services = $containerConfigurator->services(); /* * List of services */ };
# rector.yml parameters: # List of parameters services: # List of services
Run Rector check
Go to the root folder of the project and run
touch `php -r "echo sys_get_temp_dir() . '/_rector_type_probe.txt';"` && vendor/bin/rector process --dry-run
Expected output:
[OK] Rector is done!