laravelplus/installer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

laravelplus/installer

最新稳定版本:v1.0.0

Composer 安装命令:

composer require laravelplus/installer

包简介

LaravelPlus Installer: artisan command to bootstrap Laravel+Inertia apps

README 文档

README

Packagist Version Downloads PHP Laravel License

CI Pint PHPStan

A professional, pattern-driven installer to bootstrap Laravel + Inertia + Vue apps with an excellent developer experience. It features a composable workflow, interactive multi-selects for optional packages, composer-aware choices, and clean architecture for easy extension.

Quickstart

composer require laravelplus/installer --dev
php artisan laravelplus:install

Non-interactive examples:

# Production, skip audit and build, keep existing vendor/node_modules
php artisan laravelplus:install --mode=prod --yes --no-audit --no-build --no-clean

# Dry run (prints exact plan)
php artisan laravelplus:install --dry

Start dev environment:

composer run dev

Features

  • Pattern-driven architecture: Workflow orchestrator, Steps, Strategies, Reporters
  • Interactive UX: multi-select optional packages (Official, LaravelPlus, 3rd‑party)
  • Composer-aware selection: already installed packages are detected and skipped
  • Profiles: save and reuse previous selections
  • Per-step elapsed time; clean progress output and final recap
  • Events: StepStarting, StepSucceeded, StepFailed, WorkflowCompleted
  • Extensible via container‑tagged steps with priorities

Configuration

packages/laravelplus/installer/config/laravelplus_installer.php:

return [
    'clean_dependencies_by_default' => false,
    'official_package_options' => [
        ['key' => 'cashier', 'label' => 'Laravel Cashier', 'composer' => 'laravel/cashier', 'dev' => false],
        // ...
    ],
    'laravelplus_package_options' => [
        ['key' => 'fortress', 'label' => 'LaravelPlus Fortress', 'composer' => 'laravelplus/fortress', 'dev' => false],
        // ...
    ],
    'third_party_package_options' => [
        ['key' => 'pint', 'label' => 'laravel/pint', 'composer' => 'laravel/pint', 'dev' => true],
        // ...
    ],
    // Controls order of tagged steps
    'step_priorities' => [ /* class => priority */ ],
];

Extending the Installer

Bind your step and tag it laravelplus.installer.step:

$this->app->bind(MyCustomStep::class, fn ($app) => new MyCustomStep(/* deps */));
$this->app->tag([MyCustomStep::class], 'laravelplus.installer.step');

Optionally set priority in step_priorities to position it.

Troubleshooting

  • Composer auth issues: run composer config -g github-oauth.github.com <token>
  • npm audit failures: the installer treats audit as non‑fatal; use --no-audit to skip
  • Memory limit: COMPOSER_MEMORY_LIMIT=-1 composer install

Contributing

PRs are welcome. Please run Pint and PHPStan before submitting.

License

MIT © LaravelPlus

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-31