eonx-com / easy-standard
此包已被废弃,不再维护。未建议替代包。
编码标准类集中来源
3.0.24
2021-04-15 13:03 UTC
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--- 标题:简介 重量:0 ---eonx_docs---
此包是一种集中化重复使用类的方法,用于编码标准。它包含
需要包(Composer)
我们建议使用 Composer 来管理您的依赖。您可以按照以下方式要求此包
$ composer require --dev eonx/easy-standard
为 ECS(Easy Coding Standard)嗅探器准备配置文件
您可以使用以下名称之一为配置文件命名:ecs.php
、ecs.yml
、ecs.yaml
、easy-coding-standard.yml
或 easy-coding-standard.yaml
。在项目的根目录中创建此文件。
注意:在新版本的 ECS 中,YAML 配置已被弃用。如果可能,请使用 PHP 配置。
配置文件的基本结构如下
// 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
运行 ECS 检查
转到项目的根目录并运行
vendor/bin/ecs check
预期输出
[OK] No errors found. Great job - your code is shiny in style!
为 Rector 准备配置文件
您可以使用以下名称之一为配置文件命名:rector.php
、rector.yml
或 rector.yaml
。在项目的根目录中创建此文件。
注意:在新版本的 Rector 中,YAML 配置已被弃用。如果可能,请使用 PHP 配置。
配置文件的基本结构如下
// 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
运行 Rector 检查
转到项目的根目录并运行
touch `php -r "echo sys_get_temp_dir() . '/_rector_type_probe.txt';"` && vendor/bin/rector process --dry-run
预期输出
[OK] Rector is done!