Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 5.0 Shift #1

Closed
wants to merge 14 commits into from
Closed

Laravel 5.0 Shift #1

wants to merge 14 commits into from

Conversation

laravel-shift
Copy link
Owner

This pull request includes the changes for upgrading to Laravel 5.0.

Before merging, you should:

  • Checkout the laravel-5.0-shift branch
  • Review all pull request comments for additional changes
  • Run composer update
  • Thoroughly test your application

Commit any additional changes to the laravel-5.0-shift branch. If there were changes you feel could have been automated, please leave a comment on this pull request to help improve Laravel Shift.

Laravel Shift added 14 commits January 10, 2016 08:45
Laravel 5 has a new project folder structure. This commit simply moves
folders to their new locations in an effort to preserve their Git
history.
The Laravel framework adopts the PSR-2 coding style in version 5.1.
Laravel apps *should* adopt this coding style as well. Read the
[PSR-2 coding style guide][1] for more details and check out [PHPCS][2]
to use as a code formatting tool.

[1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[2]: https://github.com/squizlabs/PHP_CodeSniffer
Laravel 5 replaced `app/controllers/BaseController` with
`app/Http/Controllers/Controller`. Any custom code within the
`BaseController` class has been moved to the new `Controller` class and
all controllers have been updated to extend `Controller`.
Update the `User` model to the new authentication system in Laravel 5.
Laravel 5 models now extend `Model` and the `SoftDeletingTrait` was
renamed to `SoftDeletes`.
Laravel 5 now escapes all output from both the `{{ }}` and `{{{ }}}`
Blade directives. A new `{!! !!}` directive has been introduced to
display raw, unescaped output. To prevent incorrect escaping all
instances of `{{ }}` where changed to `{!! !!}`.
Laravel 5 replaces *Filters* with *Middleware* and enables CSRF
protection by default. This commit updates the code to use the new
`auth` and `csrf` middleware, but disables global CSRF protection.
Laravel 5 moved registering commands from `start/artisan.php` to the
`$command` array of `app/Console/Kernel.php`.
Laravel 5 adopts PSR-4 namespacing. This commit adds the proper `App`
namespace to all classes under the `app/` folder as well as `use`
statements for app classes and Laravel facades.
@laravel-shift
Copy link
Owner Author

The new storage folders required by Laravel 5 have been merged with your app/storage folder. If you are not using custom storage paths in your app, you only need the storage/app, storage/framework, and storage/logs folders. You can remove the others.

@laravel-shift
Copy link
Owner Author

Laravel 5 offers Elixir for asset management. Since your 4.2. project did not use Elixir, I did not add it. If you wish to use Elixir, you should review the documentation and add the necessary files from a new Laravel 5 app.

@laravel-shift
Copy link
Owner Author

Laravel 5 enables CSRF protection by default. Since this was not enabled in Laravel 4.2, I disabled it. You should add CSRF protection to your app then re-add 'App\Http\Middleware\VerifyCsrfToken' to $middleware in app/Http/Kernel.php.

@laravel-shift
Copy link
Owner Author

Laravel 5 does environment configuration differently. You need to copy .env.example to .env. This is the equivalent of the old .env.php file. Migrate any custom values you had in your old .env.php to the new .env file as well as any configuration values that vary by environment. You access these configuration values using the new env() method. Review the documentation on Environment Configuration for more details.

@laravel-shift laravel-shift deleted the laravel-5.0-shift branch October 25, 2016 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant