承接 wpscholar/phpcs-standards-wpscholar 相关项目开发

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

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

wpscholar/phpcs-standards-wpscholar

Composer 安装命令:

composer require wpscholar/phpcs-standards-wpscholar

包简介

PHP Code Sniffer Standards for WP Scholar

README 文档

README

An advanced configuration of the WordPress coding standards for plugin and theme development.

Usage

  • Install Composer
  • Run composer init to set up Composer for your project.
  • Run composer require wpscholar/phpcs-standards-wpscholar to install the coding standards.
  • Run vendor/bin/phpcs . --standard=WPScholar from your project root to check your code.
  • Optionally, add a script to your composer.json file so you can just run composer run lint to check your code.
"scripts": {
  "lint": [
    "vendor/bin/phpcs . --standard=WPScholar"
  ],
  "clean": [
    "vendor/bin/phpcbf . --standard=WPScholar"
  ]
}

Additional Notes

  • Append the -s flag to see the internal names of the rules.
  • Add --runtime-set testVersion 8.0- to check PHP version 8.0 or greater.
  • Add a custom phpcs.xml file to your project to customize the ruleset or your desired configuration.
<?xml version="1.0"?>
<ruleset name="Project Rules">
  <rule ref="WPScholar" />
  <config name="testVersion" value="8.0-"/>
  <config name="minimum_supported_wp_version" value="6.0"/>
</ruleset>

Additional Documentation

IDE Integration

Some IDE integrations of PHPCS will fail to register your ruleset since it doesn't live in your project root. In order to rectify this, place phpcs.xml at your project root:

<?xml version="1.0"?>
<ruleset name="Project Rules">
    <rule ref="WPScholar"/>
</ruleset>

PHPStorm Setup

  1. Open up the preferences panel.
  2. Go to "Languages & Frameworks" > "PHP" > "Code Sniffer".
  3. Ensure the "Configuration" section has "Local" set in the dropdown. Click the "..." button.
  4. Set the "PHP Code Sniffer path" to be "{projectRoot}/vendor/bin/phpcs" where "{projectRoot}" is the actual path of your project root.
  5. Hit "OK".
  6. Go to "Editor" > "Inspections" in the preference panel.
  7. Click on "PHP Code Sniffer validation" under the "PHP" > "Quality tools" section.
  8. Hit the refresh button next to the "Coding Standard" field on the right.
  9. Select "Newfold" from the dropdown.
  10. Hit "OK" to exit the preferences panel.

wpscholar/phpcs-standards-wpscholar 适用场景与选型建议

wpscholar/phpcs-standards-wpscholar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.3k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2018 年 11 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 1.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 8
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2018-11-21