openeuropa/code-review-drupal 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

openeuropa/code-review-drupal

Composer 安装命令:

composer require openeuropa/code-review-drupal

包简介

OpenEuropa code review drupal component.

README 文档

README

Packagist

Coding standard dependencies for Drupal components.

Installation

Install the code review component via Composer:

composer require --dev openeuropa/code-review-drupal

In your project root create the following grumphp.yml.dist:

imports:
  - { resource: ./vendor/openeuropa/code-review-drupal/dist/drupal-conventions.yml }

Commands

GrumPHP tasks will be run at every commit, if you wish to run them without performing a commit use the following command:

./vendor/bin/grumphp run

If you want to simulate the tasks that will be run when creating a new commit:

./vendor/bin/grumphp git:pre-commit

Check GrumPHP documentation for more.

Customization

This component offers a variety of ready conventions that all projects need to follow. This list of default conventions can be found in CONVENTIONS.md.

Since GrumPHP uses the Symfony Dependency Injection component you can override specific parameters in your project's grumphp.yml.dist file as follows:

imports:
  - { resource: ./vendor/openeuropa/code-review-drupal/dist/drupal-conventions.yml }

parameters:
  tasks.git_commit_message.matchers: ['/^JIRA-\d+: [A-Z].+\./']

Below the list of task parameters can that be overridden on a per-project basis:

  • tasks.phpcs.standard
  • tasks.phpcs.ignore_patterns
  • tasks.phpcs.triggered_by
  • tasks.phpcs.whitelist_patterns
  • tasks.phpcs.warning_severity
  • tasks.phpstan.autoload_file
  • tasks.phpstan.configuration
  • tasks.phpstan.level
  • tasks.phpstan.force_patterns
  • tasks.phpstan.triggered_by
  • tasks.git_commit_message.matchers

It is also possible to extend the list of tasks to be run by adding tasks under the tasks: tree as shown below:

imports:
  - { resource: ./vendor/openeuropa/code-review-drupal/dist/drupal-conventions.yml }

grumphp:
  tasks:
    phpparser: ~

GrumPHP already has a series of tasks that can be used out of the box, you can find the complete list in the GrumPHP tasks page.

If you wih you can create your own tasks as explained in the GrumPHP extensions page.

Transition from code-review 2.x

If you wish to transition to code-review-drupal from code-review version 2.x, please replace the package via Composer:

composer remove --dev openeuropa/code-review
composer require --dev openeuropa/code-review-drupal

Besides replacement of the package, some adjustments are needed in grumphp.yml file.

This component removes ExtraTasks extension. Any aditional task previously declared in extra_tasks will need to be placed inside tasks under grumphp tree.

- extra_tasks:
-   phpparser:
-      ignore_patterns:
-       - vendor/
-
- grumphp:
-   extensions:
-     - OpenEuropa\CodeReview\ExtraTasksExtension

+ grumphp:
+   tasks:
+     phpparser:
+      ignore_patterns:
+        - vendor/

In addition, PHP Mess Detector is no longer available as part of the configured tasks. The task and related parameters have been removed. If you wish to continue using PHP Mess Detector, you can add it as part of GrumPHP as previously described.

All other conventions and parameters remain the same.

openeuropa/code-review-drupal 适用场景与选型建议

openeuropa/code-review-drupal 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8.82k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 openeuropa/code-review-drupal 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: EUPL-1.2
  • 更新时间: 2025-02-18