承接 chiiya/laravel-code-style 相关项目开发

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

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

chiiya/laravel-code-style

最新稳定版本:3.2.0

Composer 安装命令:

composer require chiiya/laravel-code-style

包简介

Code style and quality configurations for Laravel projects

README 文档

README


Laravel Code Style

Code style configurations for Laravel projects using a combination of PHP-CS-Fixer, ECS and Rector.

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

index   ·   installation   ·   usage



Index

> Installation ..................................................................... 
> Usage ............................................................................ 

Installation

Install the package using composer. When prompted to create a GrumPHP configuration file, choose "No".

composer require chiiya/laravel-code-style --dev

Usage

# Publish config files
php artisan vendor:publish --tag="code-style-config"

Next, adjust the ecs.php, .php-cs-fixer.dist.php, rector.php and phpstan.neon files that have just been created in your project folder to suit your project structure.

After publishing the configuration files, you may have to re-initialize GrumPHP:

php ./vendor/bin/grumphp git:deinit
php ./vendor/bin/grumphp git:init

The GrumPHP config includes tasks for PHP-CS-Fixer, ECS and TLint by default. Tasks for rector and phpstan are not included, since they can take a long time. You may choose to execute them separately instead (for example, in a CI pipeline), or add them to your GrumPHP config if you're fine with the longer waiting times:

Example for grumphp.yml

grumphp:
  tasks:
    # ...
    rector: ~
    phpstan: ~

Example for a CI config (call these somewhere in your pipeline):

./vendor/bin/ecs check
./vendor/bin/php-cs-fixer fix --dry-run --diff
./vendor/bin/rector process --dry-run
./vendor/bin/tlint lint
./vendor/bin/phpstan analyse --memory-limit=2G

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-03-09