承接 drenso/phan-extensions 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

drenso/phan-extensions

最新稳定版本:v3.5.1

Composer 安装命令:

composer create-project drenso/phan-extensions

包简介

This project contains several extensions (stubs/plugins) to be used with Phan for static PHP analysis

README 文档

README

This project contains several extensions (stubs/plugins) to be used with Phan for static PHP analysis.

Note: This project is no longer actively maintained!

Build Status

Plugins

We currently have the following plugins available:

Annotation\SymfonyAnnotationPlugin

Parses all annotation that start with an uppercase letter, in order to check whether they have been imported into the file, and to remove unused warnings from vanilla Phan if they are used correctly.

The Symfony version of this plugin (currently the only one) ignores the Annotation, Target, Required and SuppressWarnings annotations by default.

DocComment\InlineVarPlugin

Scans each file in the /src directory which contains a class (if a file contains multiple classes, it will also be scanned for every time a class is defined in it). This plugin is a workaround for a limitation in php-ast, which does not expose inline comments.

DocComment\MethodPlugin

Scans each method docblock for the use of the @method, in order to set the annotated class as used.

DocComment\ThrowsPlugin

Scans each method docblock for the use of the @throws, in order to set the annotated class as used.

Note: This plugin is obsolete since Phan 0.12.3, due to this issue being closed.

Usage

You can enable a plugins by adding it to your Phan configuration:

return [
  'plugins' => [
    'vendor/drenso/phan-extensions/Plugin/Annotation/SymfonyAnnotationPlugin.php'
  ],
];

Stubs

We currently have stubs for the following packages:

  • curl
  • intl
  • ldap
  • pdo
  • radius
  • sockets

You can enable a stub by adding it to your Phan configuration. Note that you also want to disable analysis on the specific folder. You probably already added the vendor directory to your configuration (in both lists), in which case you can skip this setup.

return [
  'directory_list' => [
    'vendor/drenso/phan-extensions/Stubs'
  ],
  
  "exclude_analysis_directory_list" => [
    'vendor/drenso/phan-extensions/Stubs'
  ],
];

统计信息

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

GitHub 信息

  • Stars: 18
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-11