diff --git a/upgrade.md b/upgrade.md index aaf76baf83..a5a450da50 100644 --- a/upgrade.md +++ b/upgrade.md @@ -1,10 +1,34 @@ # Upgrade Guide +- [Upgrading To 4.3 From 4.2](#upgrade-4.3) - [Upgrading To 4.2 From 4.1](#upgrade-4.2) - [Upgrading To 4.1.29 From <= 4.1.x](#upgrade-4.1.29) - [Upgrading To 4.1.26 From <= 4.1.25](#upgrade-4.1.26) - [Upgrading To 4.1 From 4.0](#upgrade-4.1) + +## Upgrading To 4.3 From 4.2 + +### Move Routes File To Routing Directory + +Within your `app` directory, you should create a `routing` directory. Move your `routes.php` and `filters.php` files into this directory. You should also `require` your `filters.php` file from the top of your `routes.php` file. + +### Move Start Files Into Service Providers + +All of the `app/start` file contents have been transitioned to [service providers](/docs/ioc#service-providers). This provides a better starting point for most applications, as well as gives newcomers to the framework a gentle introduction to service providers. To migrate your `start` files to the new service provider architecture, you can simply copy the files from the Laravel Github repository and paste them into a new `app/src/Providers` directory within your application. You should add this directory to your `composer.json` file so that the service providers can be loaded. You should also add the providers to your `providers` array in the `app/config/app.php` configuration file. + +If you have added custom code to your start files, in most cases, you can simply copy and paste the code you have added into the `boot` method of the `AppServiceProvider` class. + +### Class Loader Removed - Use Composer + +The `ClassLoader` class has been removed in favor of using Composer for all auto-loading. In most cases, this will not require changes to your application. However, you should be aware that if you are using the `classmap` option for your controllers or other files, you will need to run `composer dump-autoload` when adding new classes to your application. + +If you copied the `ClassLoader` call to the `AppServiceProvider` from your `start/global.php` start file, you should this call from the service provider. You should also remove the `ClassLoader` call from the `bootstrap/autoload.php` file. + +### Maintenance Mode In Before Filter + +If you copied the `App::down` call from your `start/global.php` file into your new `AppServiceProvider`, you should remove this call from the provider. Instead, you may add an `if` statement to your `App::before` global filter which checks for `App::isDownForMaintenance()`. If this method return `true`, you may return any maintenance response you wish. + ## Upgrading To 4.2 From 4.1