The Laravel team released Laravel Installer v5.31.0 with a new command to scaffold Laravel packages, environment variable propagation for node-less setups, automated PHP version matching for GitHub Actions, and various compatibility fixes.
- New
laravel packagecommand to scaffold packages from the CLI - Automated PHP version matching for continuous integration workflow files
- Propagation of the
--no-nodeoption to starter kit installer hooks - Fallback output when
Laravel\Prompts\callout()is not available - Windows compatibility fix adding
--timeout=0to development queue listeners
What's New
The laravel package Command
You can now scaffold new Laravel packages directly from the command line. This command clones the official laravel/package-skeleton repository, cleans the git history, installs dependencies, and then runs the skeleton's configuration script.
To create a new package:
laravel package my-new-package
By default, the command runs interactively, prompting you for package configuration and details. It also supports various flags to predefine your package's features:
--config: Include a configuration file--routes: Include routes--views: Include views--translations: Include translations--migrations: Include migrations--assets: Include assets--commands: Include commands--facade: Include a facade--boost-skill: Include a Laravel Boost skill
You can also pass metadata options directly:
--author-name: Author name--author-email: Author email--package-name: Package name--package-name-human: Package display name--package-description: Package description--vendor-namespace: Vendor namespace--class-name: Main class name
The command works with the installer's non-interactive AI agent detection, allowing agents to automate package setup.
Local PHP Version Matching in CI Workflows
When setting up a starter kit, the installer now detects the PHP version running on your local machine and configures the generated GitHub Actions workflow (.github/workflows/tests.yml) to use the same major and minor version. This ensures that your continuous integration environment tests against the same PHP version you use for local development.
Propagating --no-node to Starter Kit Hooks
If you run laravel new with the --no-node flag, the installer now passes a LARAVEL_INSTALLER_NO_NODE=1 environment variable to any post-create starter kit hooks. This allows starter kits to bypass npm and Node-related tasks when you want to avoid Node.js dependencies.
Fallback Prompt Output
The installer now checks for the existence of Laravel\Prompts\callout() before invoking it. If the function is not available (for example, when running with older versions of Laravel Prompts), the installer falls back to writing directly to the standard output rather than throwing an error.
Windows Queue Listener Timeout Fix
During local development setup on Windows, the installer configures the dev script in composer.json to run processes concurrently. To prevent the queue listener from stopping unexpectedly, this update adds the --timeout=0 flag to php artisan queue:listen.
Upgrade Notes
No breaking changes are expected for typical applications. To update your globally installed Laravel installer, run:
composer global update laravel/installer
References
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.