| title | Upgrade Guide |
|---|---|
| description | Laravel Zero Upgrade Guide |
- Upgrading To 12.0 From 11.x
- Upgrading To 11.0 From 10.x
- Upgrading To 10.0 From 9.x
- Upgrading To 9.0 From 8.x
- Upgrading To 8.0 From 7.x
- Upgrading To 7.0 From 6.x
- Upgrading To 6.0 From 5.8
- Upgrading To 5.8 From 5.7
- Upgrading To 5.7 From 5.6
- Upgrading To 5.6 From 4.0
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
Update your laravel-zero/framework dependency to ^12.0 in your composer.json file.
If you are using any components (Database, Queue, etc.) that use Illuminate dependencies, these will need to be updated to ^12.17.
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
The new minimum PHP version is now 8.2.
Update your laravel-zero/framework dependency to ^11.0 in your composer.json file.
If you are using any components (Database, Queue, etc.) that use Illuminate dependencies, these will need to be updated to ^11.5.
Also, if you are using nunomaduro/termwind, you will need to update to ^2.0.
The Logo component has been dropped. Remove config/logo.php.
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
The new minimum PHP version is now 8.1.
Update your laravel-zero/framework dependency to ^10.0 in your composer.json file.
If you are using any components (Database, Queue, etc.) that use Illuminate dependencies, these will need to be updated to ^10.0.
The following Components have bumped their minimum dependencies. It's unlikely you will need to change anything with these as the previous version selectors include the latest versions.
- Console Dusk:
nunomaduro/laravel-console-duskbumped to^1.11 - Http:
guzzlehttp/guzzlebumped to^7.5 - Logo:
laminas/laminas-textbumped to^2.10 - Menu:
nunomaduro/laravel-console-menubumped to^3.4 - Updater:
laravel-zero/phar-updaterbumped to^1.3
The Box binary has been upgraded to 4.x.
Check the Box Upgrade Guide for more information.
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
The new minimum PHP version is now 8.0.
Update your laravel-zero/framework dependency to ^9.0 in your composer.json file.
If you are using any components (Database, Queue, etc.) that use Illuminate dependencies, these will need to be updated to ^9.0.
The following Components have bumped their minimum dependencies. It's unlikely you will need to change anything with these as the previous version selectors include the latest versions.
- Http:
guzzlehttp/guzzlebumped to^7.4 - Logo:
laminas/laminas-textbumped to^2.9 - Menu:
nunomaduro/laravel-console-menubumped to^3.3 - Updater:
laravel-zero/phar-updaterbumped to^1.2
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
The new minimum PHP version is now 7.3.
Update your laravel-zero/framework dependency to ^8.0 in your composer.json file.
If you are using any components (Database, Queue, etc.) that use Illuminate dependencies, these will need to be updated to ^8.0.
The following Components have bumped their minimum dependencies. It's unlikely you will need to change anything with these as the previous version selectors include the latest versions.
- Console Dusk:
nunomaduro/laravel-console-duskbumped to^1.8 - Http:
guzzlehttp/guzzlebumped to^6.5.5|^7.0 - Menu:
nunomaduro/laravel-console-menubumped to^3.1 - Schedule List:
hmazter/laravel-schedule-listbumped to^2.2
Although Laravel Zero 8 will work with PHPUnit 8.5 or 9.x, we'd recommend updating to use ^9.3 which has a syntax change to the configuration file. The changes applied to update this in the Laravel Zero template can be found in commit 3712842.
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
The new minimum PHP version is now 7.2.5.
Update your laravel-zero/framework dependency to ^7.0 in your composer.json file.
Laravel Zero 7 upgraded its underlying Symfony components to the 5.x series, which is now also the new minimum compatible version.
Update any symfony/* dependencies to ^5.0 in your composer.json file where necessary.
Laravel Zero 7 now requires a minimum of Collision v4.1.0 which updated the PHPUnit adapter class name.
Remove the NunoMaduro\Collision\Adapters\Phpunit\Listener class from your listeners block in your phpunit.xml.dist file.
The Logo component now depends on the Laminas Text package for Figlet generation.
Replace your zendframework/zend-text dependency with "laminas/laminas-text": "^2.7" in your composer.json.
The app.production configuration value has been removed and replaced by an app.env value in order to match Laravel.
Replace 'production' => false with 'env' => 'development' in your config/app.php file.
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
Update your laravel-zero/framework dependency to ^6.0 in your composer.json file.
All str_ and array_ helpers have been moved to the new laravel/helpers Composer package and removed from the framework. If desired, you may update all calls to these helpers to use the Illuminate\Support\Str and Illuminate\Support\Arr classes. Alternatively, you can add the new laravel/helpers package to your application to continue using these helpers:
composer require laravel/helpersWe attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
Update your laravel-zero/framework dependency to 5.8.* in your composer.json file.
The command::menu() method got removed from the core of Laravel Zero to an optional component. Using the app:install Artisan command you can install the menu component again:
php <your-app-name> app:install menuUpdate your vlucas/phpdotenv dependency to ^3.0 in your composer.json file.
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
Update your laravel-zero/framework dependency to 5.7.* in your composer.json file.
Of course, don't forget to examine any 3rd party packages consumed by your application and verify you are using the proper version for Laravel Zero 5.7 support.
Add the mockery/mockery package with version ^1.0 to the require-dev section of your composer.json file.
Update the contents of the following files:
- tests/CreatesApplication.php:
<?php
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
trait CreatesApplication
{
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
return $app;
}
}- tests/TestCase.php:
<?php
namespace Tests;
use LaravelZero\Framework\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
}The internal behavior of build feature has changed. We are now using humbug/box to provide fast application bundling.
You should create a new file box.json on the root folder of your application with the following content:
{
"chmod": "0755",
"directories": [
"app",
"bootstrap",
"config",
"vendor"
],
"files": [
"composer.json"
],
"exclude-composer-files": false,
"compression": "GZ",
"compactors": [
"Herrera\\Box\\Compactor\\Php",
"Herrera\\Box\\Compactor\\Json"
]
}The option app:build with-dev option no longer exists, and the config/app.php structure parameter also no longer exists. In order to configure your build, you should configure the box.json file. Check github.com/humbug/box/blob/master/doc/configuration.md for more details.
We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application.
Laravel Zero 5.6 requires PHP 7.1.3 or higher.
Update your laravel-zero/framework dependency to 5.6.* in your composer.json file.
Of course, don't forget to examine any 3rd party packages consumed by your application and verify you are using the proper version for Laravel 5.6 support.
You must update the phpunit/phpunit dependency of your application to ~7.0.
You must create the bootstrap/cache folder to hold application services cache. The content
of this new folder should be a single .gitignore with the following content:
*
!.gitignore
Please remove the files bootstrap/autoload.php and bootstrap/init.php. And create the file bootstrap/app.php with the
contents of the file: https://github.com/laravel-zero/laravel-zero/blob/v5.6.6/bootstrap/app.php.
The file that you use to interact with your application should contain now the following content: https://github.com/laravel-zero/laravel-zero/blob/v5.6.6/application.
You should create a config/commands.php with the contents of https://github.com/laravel-zero/laravel-zero/blob/v5.6.6/config/commands.php. Please
customize the created file in order to determine the commands that should appear in your ListCommand.
- App config
with-scheduleris no longer available. You should useconfig/commands.phpfor it. - App config
default-commandis no longer available. You should useconfig/commands.phpfor it. - App config
commands-pathsis no longer available. You should useconfig/commands.phpfor it. - App config
commandsis no longer available. You should useconfig/commands.phpfor it.
The value version on config/app.php should be updated to app('git.version').
If you have the database component installed, please take into consideration the following updates:
- Database config
with-migrationsis no longer available. You should use config/commands.php for it. - Database config
with-seedsis no longer available. You should use config/commands.php for it.
- The file
/tests/TestCase.phpshould now contain the following contents: https://github.com/laravel-zero/laravel-zero/blob/v5.6.6/tests/TestCase.php. - The file
/tests/CreatesApplication.phpshould now contain the following contents: https://github.com/laravel-zero/laravel-zero/blob/v5.6.6/tests/CreatesApplication.php.
On every tests, you should replace $this->app->call() and $this->app->output() by the Artisan facade. Example: Artisan::call and Artisan::output.
The variable $this->app will now contain a base application class of Laravel, that is the container itself.