定制 worksome/phpstan-request-factories 二次开发

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

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

worksome/phpstan-request-factories

最新稳定版本:v2.1.0

Composer 安装命令:

composer require worksome/phpstan-request-factories

包简介

A PHPStan rule for enforcing that every request has a corresponding factory.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Static Analysis Action Status Total Downloads

A PHPStan rule for enforcing that every request has a corresponding factory.

Installation

You can install the package via composer:

composer require --dev worksome/phpstan-request-factories

If you have also installed phpstan/extension-installer then everything will work out of the box.

Manual installation

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

includes:
    - vendor/worksome/phpstan-request-factories/extension.neon

Usage

Choosing different namespaces

The request and factory namespaces are both configurable. They can be configured using the following parameters:

  • requestFactories.requestsNamespace (default is App\\Http\\Requests)
  • requestFactories.factoriesNamespace (default is Tests\\RequestFactories)

For example:

parameters:
  requestFactories:
    requestsNamespace: App\Http\Requests
    factoriesNamespace: Tests\RequestFactories

Excluding request classes

If there are certain request classes that you want to exclude, you can exclude these using the excludedRequestClasses parameter.

For example:

parameters:
  requestFactories:
    excludedRequestClasses:
        - App\Http\Requests\IgnorableRequest

Testing

composer test

Changelog

Please see GitHub Releases for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-26