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
Upgrading to 12.0 from 11.x
Estimated upgrade time: 5-10 minutes
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.
Updating dependencies
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.
Upgrading to 11.0 from 10.x
Estimated upgrade time: 5-10 minutes
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.
PHP 8.2 required
The new minimum PHP version is now 8.2.
Updating dependencies
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.
If you are using the Logo component
The Logo component has been dropped. Remove config/logo.php.
Upgrading to 10.0 from 9.x
Estimated upgrade time: 5-10 minutes
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.
PHP 8.1 required
The new minimum PHP version is now 8.1.
Updating dependencies
Update your laravel-zero/framework dependency to ^10.0 in your composer.json file.
Update Illuminate dependencies
If you are using any components (Database, Queue, etc.) that use Illuminate dependencies, these will need to be updated to ^10.0.
Update component dependencies
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
Box 4.x
The Box binary has been upgraded to 4.x.
Check the Box Upgrade Guide for more information.
Upgrading to 9.0 from 8.x
Estimated upgrade time: 5-10 minutes
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.
PHP 8.0 required
The new minimum PHP version is now 8.0.
Updating dependencies
Update your laravel-zero/framework dependency to ^9.0 in your composer.json file.
Update Illuminate dependencies
If you are using any components (Database, Queue, etc.) that use Illuminate dependencies, these will need to be updated to ^9.0.
Update component dependencies
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
Upgrading to 8.0 from 7.x
Estimated upgrade time: 5-10 minutes
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.
PHP 7.3 required
The new minimum PHP version is now 7.3.
Updating dependencies
Update your laravel-zero/framework dependency to ^8.0 in your composer.json file.
Update Illuminate dependencies
If you are using any components (Database, Queue, etc.) that use Illuminate dependencies, these will need to be updated to ^8.0.
Update component dependencies
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
PHPUnit 9.3
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.
Upgrading To 7.0 From 6.x
Estimated Upgrade Time: 5-10 Minutes
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.
PHP 7.2.5 required
The new minimum PHP version is now 7.2.5.
Updating Dependencies
Update your laravel-zero/framework dependency to ^7.0 in your composer.json file.
Symfony 5 required
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.
PHPUnit changes
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.
If you are using the Logo component
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.
Configuration changes
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.
Upgrading To 6.0 From 5.8
Estimated Upgrade Time: 2 - 5 Minutes
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.
Updating Dependencies
Update your laravel-zero/framework dependency to ^6.0 in your composer.json file.
If you are using Laravel's String & Array Helper
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/helpers
Upgrading To 5.8 From 5.7
Estimated Upgrade Time: 2 - 5 Minutes
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.
Updating Dependencies
Update your laravel-zero/framework dependency to 5.8.* in your composer.json file.
If you are using the menu method
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 menu
If you are using the dotenv addon
Update your vlucas/phpdotenv dependency to ^3.0 in your composer.json file.
Upgrading To 5.7 From 5.6
Estimated Upgrade Time: 2 - 5 Minutes
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.
Updating Dependencies
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.
If you are using testing
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;
}
If you are using the build feature
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.
Upgrading To 5.6 From 4.0
Estimated Upgrade Time: 5 - 15 Minutes
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.
PHP
Laravel Zero 5.6 requires PHP 7.1.3 or higher.
Updating Dependencies
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.
PHPUnit
You must update the phpunit/phpunit dependency of your application to ~7.0.
Bootstrap
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.
Application entry point
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.
Configs
The commands.php File
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.
The app.php File
- 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').
The database.php File
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.
Tests
- 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.