wearejust/grumphp-extra-tasks

此包已被弃用且不再维护。没有建议的替代包。

GrumPHP的额外任务集合

2.2.1 2019-03-26 21:38 UTC

This package is auto-updated.

Last update: 2023-03-19 22:19:02 UTC


README

此包旨在激活以扩展已存在的GrumPHP的功能。

安装

通过composer安装此包是最简单的方法

composer require --dev wearejust/grumphp-extra-tasks

将扩展加载器添加到您的grumphp.yml

parameters:
    extensions:
        - Wearejust\GrumPHPExtra\Extension\Loader

使用方法

PhpCsAutoFixer

grumphp核心中,无法使用php-cs-fixer自动根据您的配置修复文件。此包添加了此缺失功能。

此自定义任务的配置与现有任务相同,只需指定新的php_cs_auto_fixer配置键。例如

parameters:
    tasks:
        php_cs_auto_fixer:
            config_file: .php_cs
            config: ~
            fixers: []
            level: ~
            verbose: true

PhpCsAutoFixerV2

grumphp核心中,无法使用php-cs-fixer自动根据您的配置修复文件。此包添加了此缺失功能。

此自定义任务的配置与现有任务相同,只需指定新的php_cs_auto_fixerv2配置键。例如

parameters:
    tasks:
        php_cs_auto_fixerv2:
            allow_risky: false
            cache_file: ~
            config: ~
            rules: []
            using_cache: true
            path_mode: ~
            verbose: true
            diff: false
            triggered_by: ['php']

Phpdoc

grumphp核心中,没有phpdoc任务来在提交前根据需要生成并添加phpDoc。此包添加了此缺失功能。

要使用此任务,只需在grumphp.ymltasks:部分中指定即可。

parameters:
    tasks:
        phpdoc:
            config_file: ~
            target_folder: ~
            cache_folder: ~
            filename: ~
            directory: ~
            encoding: ~
            extensions: ~
            ignore: ~
            ignore_tags: ~
            ignore_symlinks: ~
            markers: ~
            title: ~
            force: ~
            visibility: ~
            default_package_name: ~
            source_code: ~
            progress_bar: ~
            template: ~
            quiet: ~
            ansi: ~
            no_ansi: ~
            no_interaction: ~

config_file 默认: null

如果没有config_file参数,phpdoc将搜索phpdoc.dist.xml配置文件。此文件可以被phpdoc.xml覆盖。如果没有找到文件,则不使用任何配置文件。

target_folder 默认: null

如果没有此参数,文档将生成在output/文件夹中。

cache_folder 默认: null

如果没有此参数,缓存将被放置在target_folder中。

filename 默认: null

逗号分隔的文件列表到文档。

directory 默认: null 逗号分隔的目录列表到文档。

encoding 默认: null

如果没有此参数,编码将是'UTF-8'

extensions 默认: null

逗号分隔的文件扩展名列表。包含要解析的文件的扩展名。如果没有此参数,解析的文件为

  • php
  • php3
  • phtml

ignore 默认: null

逗号分隔的路径列表,解析时跳过。

ignore_tags 默认: null

解析时跳过的标签列表,用逗号分隔。

ignore_symlinks 默认值: false 告诉解析器不要跟随符号链接。

markers 默认值: null

提供要解析的标记列表,用逗号分隔(TODO ...)。

title 默认值: null

指定文档的标题。

force 默认值: null

忽略异常并继续解析。

visibility 默认值: null

提供要解析的可见性范围列表,用逗号分隔。此参数可用于告诉 phpDocumentor 只解析公共属性和方法,或者公共和受保护的方法。

default_package_name 默认值: null

默认包名

source_code 默认值: null

当提供此参数时,解析器将添加解析文件的源代码的压缩、base64编码版本作为子元素。然后,转换器可以使用此信息生成文件源代码的语法高亮视图,甚至可以提供指向特定行的直接链接。

progress_bar 默认值: null

在过程中显示进度条。

template 默认值: null

指定要使用的模板。如果没有此参数,将使用名为 "clean" 的模板。

quiet 默认值: null

使用此选项,仅显示错误。

ansi 默认值: null

强制ANSI输出。

no_ansi 默认值: null

禁用ANSI输出。

no_interaction 默认值: null

##许可证 本软件包受MIT许可证许可。