承接 exolnet/phpcs-config 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

exolnet/phpcs-config

Composer 安装命令:

composer require exolnet/phpcs-config

包简介

eXolnet configuration for PHP CodeSniffer.

README 文档

README

Software License Build Status

A collection of shareable configurations for various coding-style tools to make the configurations consistent across our projects.

Setup

  1. composer require --dev exolnet/phpcs-config
  2. Run the following command to run the standards checks:
vendor/bin/phpcs --standard=vendor/exolnet/phpcs-config .

You can add this to your Travis YAML file as a test:

script:
  - phpunit
  - vendor/bin/phpcs --standard=vendor/exolnet/phpcs-config .

Excluding Files

This standard includes special support for a .phpcsignore file (in the future, this should be built into phpcs itself). Simply place a .phpcsignore file in your root directory (wherever you're going to run phpcs from).

The format of this file is similar to .gitignore and similar files: one pattern per line, comment lines should start with a #, and whitespace-only lines are ignored:

# Exclude our tests directory.
tests/

# Exclude any file ending with ".inc"
*\.inc

Note that the patterns should match the PHP_CodeSniffer style: * is translated to .* for convenience, but all other characters work like a regular expression.

Patterns are relative to the directory that the .phpcsignore file lives in. On load, they are translated to absolute patterns: e.g. */tests/* in /your/dir/.phpcsignore will become /your/dir/.*/tests/.* as a regular expression. This differs from the regular PHP_CodeSniffer practice.

Advanced/Extending

If you want to add further rules (such as laravel-specific rules), you can create your own custom standard file (e.g. ruleset.xml):

<?xml version="1.0"?>
<ruleset>
    <file>app</file>
    <file>config</file>
    <file>database</file>
    <file>routes</file>
    <file>tests</file>
    
    <!-- Use eXolnet Coding Standards -->
    <rule ref="vendor/exolnet/phpcs-config" />
    
    <!-- Add Laravel-specific rules -->
    <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
        <exclude-pattern>database/*</exclude-pattern>
    </rule>
</ruleset>

You can then reference this file when running phpcs:

vendor/bin/phpcs --standard=ruleset.xml .

Excluding/Disabling Checks

You can also customise the rule to exclude elements if they aren't applicable to the project:

<rule ref="vendor/exolnet/phpcs-config">
	<!-- Disable short array syntax -->
	<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
</rule>

Rules can also be disabled inline. phpcs rules can be disabled with a // @codingStandardsIgnoreLine comment, and ESLint rules can be disabled with a /* eslint disable ... */ comment.

To find out what these codes are, specify -s when running phpcs, and the code will be output as well. You can specify a full code, or a partial one to disable groups of errors.

Security

If you discover any security related issues, please email security@exolnet.com instead of using the issue tracker.

Credits

License

Copyright © eXolnet. All rights reserved.

This code is licensed under the MIT license. Please see the license file for more information.

exolnet/phpcs-config 适用场景与选型建议

exolnet/phpcs-config 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 85.64k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 10 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「phpcs」 「psr」 「exolnet」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 exolnet/phpcs-config 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 exolnet/phpcs-config 我们能提供哪些服务?
定制开发 / 二次开发

基于 exolnet/phpcs-config 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 85.64k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 38
  • 依赖项目数: 13
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-10-29