zieglerh/php-code-quality 问题修复 & 功能扩展

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

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

zieglerh/php-code-quality

最新稳定版本:v1.0

Composer 安装命令:

composer require zieglerh/php-code-quality

包简介

CLI tool for running PHP 8.x for Pimcore 11 code checks

README 文档

README

CLI tools for running PHP code checks and refactoring for Pimcore

Installation

Composer

composer require --dev zieglerh/php-code-quality:^1.0

Templates

Copy /templates/* into your project root folder

Overwrite rulesets

In your .env file you can define a path to overwrite the rulesets, e.g. from your project root

PHPCS_RULESET_FILE=./phpcs.xml
PHPMD_RULESET_FILE=./phpmd.xml

Disable tools

You can disable tools in your .env file by setting the following

PHPCS=0
PHPMD=0
PHPSTAN=0

or disable all of them with

CODE_CHECKS_ENABLED=0

Overwrite tool arguments

You can also overwrite tool arguments from definition_args.conf in your .env file

PHPCS_ARGS=...
PHPMD_ARGS=...
PHPSTAN_ARGS=...

Execute

Code checks

vendor/bin/code-check

To execute only specific tools, you can append one or multiple arguments

vendor/bin/code-check phpcs phpmd phpstan

Automatic refactoring

Display automatic code refactoring

vendor/bin/rector process --dry-run

Run rector and change all files

vendor/bin/rector process

Configuring rulesets

Configuration

For configuration of tools see defnitions_tools.conf

Rulesets

Rulesets are defined inside the rulesets/*.xml files and can be overwritten

See Overwrite rulesets

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-03-10