Upgrade Guide
- Upgrading from 3.1 to 3.2
- Upgrading from 3.0 to 3.1
- Upgrading from 2.1 to 2.2
- Upgrading from 2.0 to 2.1
Upgrading from 3.1 to 3.2
Update app/Http/Kernel.php
Update $middleware
properties:
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
];
Add new $middlewareGroup
properties:
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
Middleware\VerifyCsrfToken::class,
],
'orchestra' => [
'web',
\Orchestra\Foundation\Http\Middleware\LoginAs::class,
\Orchestra\Foundation\Http\Middleware\UseBackendTheme::class,
],
'api' => [
'throttle:60,1',
],
];
Add throttle
to route middleware:
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
The updated value can be found in this file (raw).
Upgrading Your Composer Dependency
To upgrade to Orchestra Platform 3.2, change your "orchestra/foundation"
version to "3.2.*"
in your composer.json
file.
As a pre-caution, run
php artisan clear-compiled
before executingcomposer update
.
Adding Configuration Files & Options
Update your aliases and providers arrays in your resources/config/app.php
configuration file. The updated values for these arrays can be found in this file (raw). Be sure to add your custom and package service providers / aliases back to the arrays.
Provides | Action |
---|---|
Orchestra\Foundation\Providers\ArtisanServiceProvider |
Remove |
Orchestra\Routing\ControllerServiceProvider |
Remove |
Add env
configuration key under resources/config/app.php
.
'env' => env('APP_ENV', 'production'),
Replace resources/config/auth.php
file from the repository (raw).
HTML E-mail Templates
By default, Orchestra Platform 3.2 now use HTML e-mail template as default. Your can replace the base text e-mail template with the updated version by replacing the following files:
resources/views/emails/auth/password.blade.php
(file|raw)resources/views/emails/auth/register.blade.php
(file|raw).
Laravel Changes
You can also check out the full Upgrading Guide for Laravel 5.2 as well as Laravel 5.1 Release Note.
Upgrading from 3.0 to 3.1
Update bootstrap/autoload.php
Update the $compiledPath
variable in bootstrap/autoload.php
to the following:
$compiledPath = __DIR__.'/cache/compiled.php';
Create bootstrap/cache
Directory
Within your bootstrap
directory, create a cache
directory (bootstrap/cache
). Place a .gitignore
file in this directory with the following contents:
*
!.gitignore
This directory should be writable, and will be used by the framework to store temporary optimization files like compiled.php
, routes.php
, config.php
, and services.json
.
Upgrading Your Composer Dependency
To upgrade to Orchestra Platform 3.1, change your "orchestra/foundation"
version to "3.1.*"
in your composer.json
file.
As a pre-caution, run
php artisan clear-compiled
before executingcomposer update
.
Adding Configuration Files & Options
Update your aliases and providers arrays in your resources/config/app.php
configuration file. The updated values for these arrays can be found in this file (raw). Be sure to add your custom and package service providers / aliases back to the arrays.
Provides | Action |
---|---|
Illuminate\Broadcasting\BroadcastServiceProvider |
Add |
Orchestra\Foundation\Providers\FilterServiceProvider |
Remove |
Orchestra\Foundation\Providers\RouteServiceProvider |
Add |
Add the new resources/config/broadcasting.php
file from the repository (raw).
Full Skeleton Changes
You can review the full application skeleton changes by viewing the full changes.
Laravel Changes
You can also check out the full Upgrading Guide for Laravel 5.1 as well as Laravel 5.1 Release Note.
Upgrading from 2.1 to 2.2
Upgrading Your Composer Dependency
To upgrade to Orchestra Platform 2.2, change your "orchestra/foundation"
version to "2.2.*"
in your composer.json
file.
As a pre-caution, remove
bootstrap/compiled.php
file if it exist to avoid possible error during upgrade.
Adding Configuration Files & Options
Add the new cipher
configuration option to your app/config/app.php
file. The default value should be MCRYPT_RIJNDAEL_256
constant.
'cipher' => MCRYPT_RIJNDAEL_256,
Add the new fallback_locale
configuration option to your app/config/app.php
file. The default value should be en
.
'fallback_locale' => 'en',
Add the new alias to your app/config/app.php
.
'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait',
Add new app/config/services.php
file from the repository (raw).
Upgrading from 2.0 to 2.1
Upgrading Your Composer Dependency
To upgrade to Orchestra Platform 2.1, change your "orchestra/foundation"
version to "2.1.*"
in your composer.json
file.
As a pre-caution, remove
bootstrap/compiled.php
file if it exist to avoid possible error during upgrade.
Replace Files
Replace your public/index.php
file with this fresh copy from the repository (raw).
Replace your artisan
file with this fresh copy from the repository (raw).
Adding Configuration Files & Options
Update your aliases and providers arrays in your app/config/app.php
configuration file. The updated values for these arrays can be found in this file (raw). Be sure to add your custom and package service providers / aliases back to the arrays.
Provides | Action |
---|---|
Illuminate\Foundation\Providers\CommandCreatorServiceProvider | Remove |
Illuminate\Foundation\Providers\ComposerServiceProvider | Remove |
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider | Add |
Illuminate\Foundation\Providers\KeyGeneratorServiceProvider | Remove |
Illuminate\Foundation\Providers\MaintenanceServiceProvider | Remove |
Illuminate\Foundation\Providers\OptimizeServiceProvider | Remove |
Illuminate\Foundation\Providers\RouteListServiceProvider | Remove |
Illuminate\Remote\RemoteServiceProvider | Add |
Illuminate\Foundation\Providers\ServerServiceProvider | Remove |
Illuminate\Foundation\Providers\TinkerServiceProvider | Remove |
Orchestra\Debug\DebugServiceProvider | Add |
Orchestra\Notifier\NotifierServiceProvider | Add |
Orchestra\Optimize\OptimizeServiceProvider | Add |
Orchestra\Auth\CommandServiceProvider | Remove |
Orchestra\Extension\CommandServiceProvider | Remove |
Orchestra\Memory\CommandServiceProvider | Remove |
Orchestra\Foundation\ConsoleSupportServiceProvider | Add |
Update redis.cluster
configuration section to false
in your app/config/database.php
.
Add the new app/config/remote.php
file from the repository (raw).
Add the new expire_on_close
configuration option to your app/config/session.php
file. The default value should be false
.
Add the new failed
configuration section to your app/config/queue.php
file. Here are the default values for the section:
'failed' => array(
'database' => 'mysql', 'table' => 'failed_jobs',
),
Optional
Update the pagination configuration option in your app/config/view.php
file to pagination::slider-3
(if you're using Twitter Bootstrap 3 instead of Bootstrap 2).
E-mail Templates
Update app/views/emails/auth/reminder.blade.php
file with this fresh copy from the repository (raw).
Add new app/views/emails/auth/register.blade.php
file with this fresh copy from the repository (raw).
Controller Updates
If app/controllers/BaseController.php
has a use statement at the top, change use Illuminate\Routing\Controllers\Controller;
to use Illuminate\Routing\Controller;
.
Password Reminders Updates
Password reminders have been overhauled for greater flexibility. Update your app/lang/en/reminders.php
language file to match this updated file (raw).
Environment Detection Updates
For security reasons, URL domains may no longer be used to detect your application environment. These values are easily spoofable and allow attackers to modify the environment for a request. You should convert your environment detection to use machine host names (hostname
command on Mac & Ubuntu).
Simpler Log Files
Laravel now generates a single log file: app/storage/logs/laravel.log
. However, you may still configure this behavior in your app/start/global.php
file.
Removing Redirect Trailing Slash
In your bootstrap/start.php
file, remove the call to $app->redirectIfTrailingSlash()
. This method is no longer needed as this functionality is now handled by the .htaccess
file included with the framework.
Next, replace your Apache .htaccess
file with this new one (raw) that handles trailing slashes.
Current Route Access
The current route is now accessed via Route::current()
instead of Route::getCurrentRoute()
.
Composer Update
Once you have completed the changes above, you can run the composer update
function to update your core application files!