creatuity/magento-quality-tools 问题修复 & 功能扩展

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

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

creatuity/magento-quality-tools

最新稳定版本:v1.0.1

Composer 安装命令:

composer require creatuity/magento-quality-tools

包简介

The composer package basing on GrumPHP tool with pre-defined configuration for Magento projects

README 文档

README

Installation

composer require --dev creatuity/magento-quality-tools

DO NOT create a grumphp.yml file in the root directory when you will be prompted

Add the following to your composer.json

  "extra": {
    "grumphp": {
            "config-default-path": "vendor/creatuity/magento-quality-tools/src/grumphp.yml"
        }
  }

According to the issue with Magento Coding Standard package it's also needed to add this to your composer.json file

 "scripts": {
        "post-install-cmd": [
            "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/,../../phpcompatibility/php-compatibility)"
        ]
    },

and run composer install to apply the changes.

Usage

  • Make sure that your changes are in GIT staging area.
  • When you want to commit your changes, type.
./vendor/bin/grumphp git:pre-commit

to run tasks defined in grumphp.yml only on the code from the commit. This command will be also run when you try to do a commit - it uses git pre-commit hook.

Built-in tasks

This package has pre-defined configuration of grumphp.yml file, thanks for that you can install and just use it. Currently, the package contains these tasks :

  • jsonlint
  • xmllint
  • phplint
  • yamllint
  • composer
  • phpcs
  • phpcsfixer2
  • phpmd
  • phpstan - Currently the level is set to 6
  • git_commit_message - This task validates a message in a commit. Allowed length of body and subject is limited to 120 characters. It also requires to begin a message from a task number, example - [PROJECTX-123] Test commit
  • git_branch_name - The task validates a branch name. It allows to use two type of branch names:
    • Task branches - which starts from hotfix|bugfix|feature prefix and contains a task number and short description, example - feature/PROJECTX-short-description
    • Release branches - release/0.1.1
  • git_blacklist - This task checks if a developer didn't use one of blacklisted words like var_dump or console.log

Compatibility

  • Magento >= 2.4.2
  • PHP version >= 7.2 || >= 8.1

Known Issues

  • If you're getting an error like this one :
Warning: class_implements(): Class Vendor\Module\Setup\Patch\Data\ExamplePatch does not exist and could not be loaded in /dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/AllPurposeAction.php on line 35

check this issue on the Github magento/magento2#33430

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-09-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固