定制 craftcms/phpstan 二次开发

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

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

craftcms/phpstan

Composer 安装命令:

composer require craftcms/phpstan

包简介

PHPStan configuration for Craft CMS projects

README 文档

README

This package provides a base PHPStan configuration for Craft CMS plugins and projects.

To install, run the following commands within your plugin or project:

composer config minimum-stability dev
composer config prefer-stable true
composer require craftcms/phpstan:dev-main --dev

Then add a phpstan.neon config file to the root of your project:

includes:
    - vendor/craftcms/phpstan/phpstan.neon

parameters:
    level: 0
    paths:
        - src

Change the paths array to whichever directory(s) contain the source code you want PHPStan to inspect.

(See PHPStan’s Config Reference for a full list of supported config parameters.)

With that in place, you can begin running PHPStan with the following command:

vendor/bin/phpstan --memory-limit=1G

Or define a phpstan script in composer.json:

{
  "...": "...",
  "scripts": {
    "phpstan": "phpstan --memory-limit=1G"
  }
}

And then run PHPStan with:

composer run-script phpstan

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 4
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-03-04