Laravel 4.2 requires PHP 5.4.0 or greater.
If you are directly referencing the Illuminate\View\Environment
class or Illuminate\Pagination\Environment
class, update your code to reference Illuminate\View\Factory
and Illuminate\Pagination\Factory
instead. These two classes have been renamed to better reflect their function.
To upgrade your application to Laravel 4.1, change your laravel/framework
version to 4.1.*
in your composer.json
file.
Replace your public/index.php
file with this fresh copy from the repository.
Replace your artisan
file with this fresh copy from the repository.
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. Be sure to add your custom and package service providers / aliases back to the arrays.
Add the new app/config/remote.php
file from the repository.
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 app/controllers/BaseController.php
has a use
statement at the top, change use Illuminate\Routing\Controllers\Controller;
to use Illuminate\Routing\Controller;
.
Password reminders have been overhauled for greater flexibility. You may examine the new stub controller by running the php artisan auth:reminders-controller
Artisan command. You may also browse the updated documentation and update your application accordingly.
Update your app/lang/en/reminders.php
language file to match this updated file.
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).
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.
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 that handles trailing slashes.
The current route is now accessed via Route::current()
instead of Route::getCurrentRoute()
.
Once you have completed the changes above, you can run the composer update
function to update your core application files! If you receive class load errors, try running the update
command with the --no-scripts
option enabled like so: composer update --no-scripts
.