achertovsky/phptools 问题修复 & 功能扩展

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

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

achertovsky/phptools

最新稳定版本:0.5.2

Composer 安装命令:

composer require achertovsky/phptools

包简介

README 文档

README

Toolset which usually required to develop php and check code you write. Contains:

  • phpstan
  • phpmd
  • phpcs
  • phpcpd
  • phpmnd

Usage

Dependencies

Make sure your env has app called xq, install it via package manager

Install and first run

composer require --dev achertovsky/phptools
vendor/bin/suggest-config
vendor/bin/phptools

Notes

phpstan-related

phpstan launched with --memory_limit=-1 flag due to widely-known issues so to not it leat all memory of your machine use -m param of docker to limit container memory

phptools options applicable

  • -m will check files that is modified/added according to git
  • -p test.php will check provided file only

phpcpd

phar placed in lib code is box'ed from latest phpcpd main branch code and do not belong to lib author

Tools config

You can create your own

config file for phpcs

https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file

config file for phpmd

https://phpmd.org/documentation/creating-a-ruleset.html

config file for phpstan

https://phpstan.org/config-reference#config-file

config file for phpcpd

check phpcpd.xml file in config directory

config file for phpmnd

check phpmnd.xml file in config directory

config file for phpdrc

https://github.com/achertovsky/phpdrc/blob/master/readme.md#config

Development

docker build -t phptools .
docker run --rm -it -u${UID} -v${PWD}:/var/www/html -w/var/www/html phptools composer i
cp config/* .
docker run --rm -it -u${UID} -v${PWD}:/var/www/html -w/var/www/html phptools php phptools

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-16