定制 dev-to-geek/laravel-init 二次开发

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

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

dev-to-geek/laravel-init

Composer 安装命令:

composer require dev-to-geek/laravel-init

包简介

A little package I use to add preconfigured tools (PHPStan, Larastan, Pint, Pail, ...) to my projects

README 文档

README

Latest Version on Packagist GitHub Tests Action Status PHPStan Total Downloads

A Laravel package that bootstraps your project with preconfigured development tools via a single artisan command.

Requirements

  • PHP ^8.3
  • Laravel ^12.0

Installation

composer require dev-to-geek/laravel-init --dev

Usage

php artisan laravel-init:install

This command will automatically install and configure the following tools:

  • Laravel Pint -- Automated code formatting (with pint.json config).
  • Larastan -- PHPStan + Larastan static analysis (with phpstan.neon.dist config).
  • Pest PHP -- Modern testing framework with Mockery, Laravel and Livewire plugins.
  • Laravel Pail -- Real-time log viewer.
  • Rector -- Automated code refactoring (with rector.php config).
  • Laravel Boost -- MCP Server for AI-assisted development.

No manual setup is required; everything is ready to use after running the command.

Options

--only -- Install specific tools

Install only the tools you need instead of the full suite:

# Install only Pint and Larastan
php artisan laravel-init:install --only=pint --only=larastan

# Install only Pest
php artisan laravel-init:install --only=pest

Valid tool names: pint, larastan, pest, pail, rector, boost.

--force -- Overwrite existing configuration files

By default, existing configuration files (pint.json, phpstan.neon.dist, rector.php) are not overwritten. Use --force to replace them:

php artisan laravel-init:install --force

--remove-me -- Self-uninstall after setup

Remove the laravel-init package from your project after all tools have been installed:

php artisan laravel-init:install --remove-me

Suggested composer scripts

After installation, you can add these scripts to your composer.json:

"scripts": {
    "test": "@php artisan test",
    "test-coverage": "@php artisan test --parallel --coverage",
    "analyse": "vendor/bin/phpstan analyse --memory-limit=2G",
    "format": "vendor/bin/pint",
    "refactor": "vendor/bin/rector"
}

Changelog

Please see CHANGELOG 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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固