29.07.2016 Views

laravel-5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Upgrade Guide 26<br />

Deprecations<br />

The following Laravel features have been deprecated and will be removed entirely with the release<br />

of Laravel 5.2 in December 2015:<br />

Upgrading To 5.0.16 {#upgrade-upgrade-5.0.16}<br />

In your bootstrap/autoload.php file, update the $compiledPath variable to:<br />

.<br />

1 $compiledPath = __DIR__.'/../vendor/compiled.php';<br />

Upgrading To 5.0 From 4.2 {#upgrade-upgrade-5.0}<br />

Fresh Install, Then Migrate<br />

The recommended method of upgrading is to create a new Laravel 5.0 install and then to copy your<br />

4.2 site’s unique application files into the new application. This would include controllers, routes,<br />

Eloquent models, Artisan commands, assets, and other code specific to your application.<br />

To start, install a new Laravel 5.0 application into a fresh directory in your local environment. Do<br />

not install any versions newer than 5.0 yet, since we need to complete the migration steps for 5.0<br />

first. We’ll discuss each piece of the migration process in further detail below.<br />

Composer Dependencies & Packages<br />

Don’t forget to copy any additional Composer dependencies into your 5.0 application. This includes<br />

third-party code such as SDKs.<br />

Some Laravel-specific packages may not be compatible with Laravel 5 on initial release. Check with<br />

your package’s maintainer to determine the proper version of the package for Laravel 5. Once you<br />

have added any additional Composer dependencies your application needs, run composer update.<br />

Namespacing<br />

By default, Laravel 4 applications did not utilize namespacing within your application code. So, for<br />

example, all Eloquent models and controllers simply lived in the “global” namespace. For a quicker<br />

migration, you can simply leave these classes in the global namespace in Laravel 5 as well.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!