定制 tetreum/cancerstan 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

tetreum/cancerstan

最新稳定版本:v0.3

Composer 安装命令:

composer require --dev tetreum/cancerstan

包简介

Fix some PHPStan errors automatically

关键字:

README 文档

README

        _________                                   _________ __                 
        \_   ___ \_____    ____   ____  ___________/   _____//  |______    ____  
        /    \  \/\__  \  /    \_/ ___\/ __ \_  __ \_____  \\   __\__  \  /    \ 
        \     \____/ __ \|   |  \  \__\  ___/|  | \/        \|  |  / __ \|   |  \
         \______  (____  /___|  /\___  >___  >__| /_______  /|__| (____  /___|  /
                \/     \/     \/     \/    \/             \/           \/     \/ 

Tired of manually fixing PHPStan "errors"?

With CancerStan you can fix some of them automatically or build new fixers yourself to fix even more.

Screenshot from 2025-07-20 11-02-17

Install

composer require --dev tetreum/cancerstan

Usage

vendor/bin/cancerstan --dry-run

CancerStan will run PHPStan first to gather the error list and then try to fix them for you.

Options

  • --dry-run: Will return the changes to apply without applying them
  • --stan: To provide PHPStan's location. Ex: --stan=/docker/phpstan . Default: /vendor/bin/phpstan
  • --custom-fixers: Path to custom fixers directory. Ex: --custom-fixers=./MyCustomFixers

Custom fixers

Your codebase may have it's own tricks and requirements, so you can also make and load custom fixers. Check the src/Fixers folder to get an idea on how to build them.

To load them just point CancerStan to their folder like: vendor/bin/cancerstan --custom-fixers=YOUR_FIXERS_FOLDER_PATH

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-17