2.3 KiB
2.3 KiB
Laravel Upgrade Guide
Upgrading From 4.0 to 4.1
- Update
composer.jsonto require"laravel/framework": "4.1.*" - Remove call to
redirectIfTrailingSlashin/bootstrap/start.phpfile. - Replace
/public/index.phpwith this file, and/artisanwith this file. - Add new
app/config/remote.phpfile from here - Add new
expire_on_closeandsecureoptions tosessionconfiguration file to match this file. - Add new
failedqueue job option toqueueconfiguration file to match this file. - Edit
app/config/database.phpand updateredis.clusteroption tofalseto turn Redis clustering off by default. - Edit
app/config/view.phpand updatepaginationoption to use bootstrap 3 as default pagination view (optional). - Edit
app/config/app.phpso thealiasesandprovidersarray match this file:- in
aliaseschange'Controller' => 'Illuminate\Routing\Controllers\Controller',to useIlluminate\Routing\Controller. - in
providersadd'Illuminate\Remote\RemoteServiceProvider',. - in
aliasesadd'SSH' => 'Illuminate\Support\Facades\SSH',.
- in
- If
app/controllers/BaseController.phphas a use statement at the top, changeuse Illuminate\Routing\Controllers\Controller;touse Illuminate\Routing\Controller;. You may also remove this use statament, for you have registered a class alias for this. - If you are overriding
missingMethodin your controllers, add $method as the first parameter. - Password reminder system tweaked for greater developer freedom. Inspect stub controller by running
auth:reminders-controllerArtisan command. - Update
reminders.phplanguage file to match this file. - If you are using http hosts to set the $env variable in bootstrap/start.php, these should be changed to machine names (as returned by PHP's gethostname() function).
Finally,
- Run
composer update