distortedfusion/php-cs-fixer-config
Composer 安装命令:
composer require distortedfusion/php-cs-fixer-config
包简介
A shared php-cs-fixer config used in our packages.
README 文档
README
This is a shared FriendsOfPHP/PHP-CS-Fixer configuration used in our packages.
Installation
composer require --dev distortedfusion/php-cs-fixer-config
Usage
Create a .php_cs.dist configuration file in the root of your project.
<?php $config = new DistortedFusion\PhpCsFixerConfig\Config(); $config->getFinder() ->in(__DIR__ . "/src") ->in(__DIR__ . "/tests"); return $config;
Adding or overloading rules
Adding an array of rules to the construct of the Config object allows you to add or overload rules:
<?php $config = new DistortedFusion\PhpCsFixerConfig\Config([ 'psr0' => false, 'psr4' => false, ]); $config->getFinder() ->in(__DIR__ . "/src") ->in(__DIR__ . "/tests"); return $config;
Composer scripts
Adding composer scripts makes it easy to add aliases for testing and fixing code styling.
Please Note: The config contains risky rules by default, this requires the usage of --allow-risky=yes. If you don't want to run risky rules you can excluded them in the .php-cs.dist config.
{
...
"scripts": {
"phpcs-fix" : "php-cs-fixer fix --using-cache=no --allow-risky=yes --ansi",
"phpcs": "php-cs-fixer fix -v --diff --dry-run --allow-risky=yes --ansi",
"test": [
"@phpcs"
]
},
"scripts-descriptions": {
"phpcs": "Runs coding style test suite",
"test": "Runs all tests"
}
}
Testing
To run the tests, run the following command from the project folder:
$ composer test
Security
If you discover a security vulnerability within this package, please send an e-mail to Kevin Dierkx via kevin@distortedfusion.com. All security vulnerabilities will be promptly addressed.
Contributing
Contributions are welcome and will be fully credited. Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.
distortedfusion/php-cs-fixer-config 适用场景与选型建议
distortedfusion/php-cs-fixer-config 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17.63k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 09 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「config」 「distortedfusion」 「php-cs-fixer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 distortedfusion/php-cs-fixer-config 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 distortedfusion/php-cs-fixer-config 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 distortedfusion/php-cs-fixer-config 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel package to integrate PHP Domain parser.
HiDev plugin for PHP-CS-Fixer
Taptima PHP-CS-Fixer fixers
A Zend Framework module to quickly and easily set PHP settings.
Axa Zara PHP Code style configuration for `php-cs-fixer` based on PSR-12.
A generic package for implementing Laravel Pint coding standards across Laravel packages
统计信息
- 总下载量: 17.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 12
- 依赖项目数: 7
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-09-11