定制 ticketswap/phpstan-error-formatter 二次开发

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

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

ticketswap/phpstan-error-formatter

最新稳定版本:1.2.4

Composer 安装命令:

composer require --dev ticketswap/phpstan-error-formatter

包简介

A minimalistic error formatter for PHPStan

关键字:

README 文档

README

A minimalistic error formatter for PHPStan

Screenshot

Latest Stable Version PHP Version Require Total Downloads License

Features

  • Every error has it's own clickable file + line link (default formatter shows the file once, and then displays the line + errors)
  • Errors don't wrap, so they take your while terminal (default formatter wraps in a table)
  • Highlighting of variables, fully qualified class names and other common types. This is done naively and there are cases where it does not work.
  • Long file paths are truncated visually (src/App/../Entity/User.php) while keeping the clickable link intact
  • The filename + line is clickable depending on your terminal and their support for clickable links. For example, in PHPStorm's built-in editor, it doesn't work and there we print file:///Volumes/CS/www/src/App/User.php.

Installation

To use this extension, require it in Composer:

composer require --dev ticketswap/phpstan-error-formatter

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include extension.neon in your project's PHPStan config:

includes:
    - vendor/ticketswap/phpstan-error-formatter/extension.neon

Usage

Configure PHPStan to use the ticketswap error formatter:

parameters:
    errorFormat: ticketswap

When you haven't done so, make sure to configure the editorUrl:

For example, on PhpStorm:

parameters:
    editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'

On Visual Studio Code, you can change to:

parameters:
    editorUrl: 'vscode://file/%%file%%:%%line%%'

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-26