- How do I upgrade my Laravel 11 app to the latest version using this package?
- Run `php artisan updater:update` in your project root. The package handles Composer updates, Laravel core upgrades, and executes pre/post-update pipelines automatically. Always test in staging first with `--dry-run` to preview changes.
- Does Laravel Updater support custom pre/post-update scripts?
- Yes, the package includes pipeline hooks for custom scripts. Define them in the `updater.php` config file under `pipelines.before` or `pipelines.after`. Use cases include running migrations, clearing caches, or restarting queue workers.
- Will this package update third-party Composer packages or just Laravel core?
- By default, it updates all dependencies in `composer.json`. To restrict updates, configure the `update_dependencies` flag in the updater config or use the `--core-only` flag to update only Laravel core.
- Is Laravel Updater compatible with Laravel 10, 11, and 12?
- Yes, the package officially supports Laravel 10, 11, and 12 (as of v1.3.0). Check the [documentation](https://salahhusa9.com/laravel-updater) for version-specific requirements, such as PHP 8.1+ for Laravel 10+.
- Can I use this in a CI/CD pipeline like GitHub Actions?
- Absolutely. The package is designed for automation. Add a step like `php artisan updater:update --pipeline=production` to your workflow. Use environment variables to control flags (e.g., `--dry-run` for staging).
- What happens if the update fails? Can I roll back?
- Failed updates won’t modify your codebase until completion. For rollbacks, manually revert Composer changes (`composer update --with-all-dependencies`) or restore from a backup. Future versions may add automated rollback support.
- Does Laravel Updater work safely in production?
- Use it cautiously in production. Test thoroughly in staging first, and consider using `--dry-run` to validate changes. For zero-downtime deployments, update non-production environments first or use feature flags.
- How do I handle environment-specific configurations (e.g., .env) during updates?
- The package preserves `.env` files by default. If you need to update environment variables, manually edit `.env` post-update or include a custom script in the `after` pipeline to handle this.
- Are there alternatives to Laravel Updater for Laravel version upgrades?
- For manual upgrades, use `composer update` + Laravel’s built-in `upgrade` command. Other packages like `spatie/laravel-upgrade` focus on specific tasks (e.g., database migrations). Laravel Updater combines dependency updates, pipelines, and hooks in one tool.
- How can I contribute to or report issues with Laravel Updater?
- Check the [GitHub repository](https://github.com/salahhusa9/laravel-updater) for contribution guidelines. Report bugs via GitHub Issues, and include your Laravel/PHP versions, error logs, and steps to reproduce. The maintainer actively responds to issues.