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.3 Shift #2195

Merged
merged 20 commits into from
Oct 22, 2016
Merged

Laravel 5.3 Shift #2195

merged 20 commits into from
Oct 22, 2016

Conversation

laravel-shift
Copy link
Contributor

This pull request includes the changes for upgrading to Laravel 5.3. Feel free to commit any additional changes to the laravel-5.3-shift branch.

Before merging, you should:

  • Checkout the laravel-5.3-shift branch
  • Review all pull request comments for additional changes
  • Run composer update (if the pre-commands fail, add --no-scripts)
  • Thoroughly test your application

If you would like more help with your upgrade, check out the new human services from Laravel Shift.

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.3 now stores Routes in a top-level `routes` folder and
separates them into API, console, and web files.
@laravel-shift
Copy link
Contributor Author

ℹ Laravel 5.3 updated the app/Jobs folder by default. It is created for you when you make your first Job using artisan. I did not remove yours as it appears to differ from the default. However, if your app does not use Jobs, you can remove this folder manually to keep your app streamlined.

@laravel-shift
Copy link
Contributor Author

ℹ Laravel 5.3 no longer includes the app/Events folder by default. It is created for you when you make your first Event using artisan. I did not remove yours as it appears to differ from the default. However, if your app does not use Events, you can remove this folder manually to keep your app streamlined.

@laravel-shift
Copy link
Contributor Author

❌ I was not able to update your app/Providers/AuthServiceProvider.php. You will need to compare yours against the 5.3 version and merge the new changes.

@laravel-shift
Copy link
Contributor Author

❌ I was not able to update your app/Providers/EventServiceProvider.php. You will need to compare yours against the 5.3 version and merge the new changes.

@laravel-shift
Copy link
Contributor Author

❌ I was not able to update your app/Providers/RouteServiceProvider.php. You will need to compare yours against the 5.3 version and merge the new changes.

@laravel-shift
Copy link
Contributor Author

❌ Laravel 5.3 now includes a top-level routes folder. In addition, it separates routes into API, console, and web files.I have included the default route files. You will need to review your routes and migrate them new route files accordingly.

@laravel-shift
Copy link
Contributor Author

laravel-shift commented Oct 19, 2016

❌ I could not upgrade the following configuration files since they differed from the 5.2 defaults. You need to compare these configuration files against the Laravel 5.3 configuration files and merge any changes:

  • config/auth.php
  • config/cache.php
  • config/database.php
  • config/services.php
  • config/session.php

@laravel-shift
Copy link
Contributor Author

laravel-shift commented Oct 19, 2016

❌ I could not upgrade the following project files since they differed from the 5.2 defaults. You need to compare these project files against the default Laravel 5.3 versions and merge any changes:

  • gulpfile.js
  • package.json

@laravel-shift
Copy link
Contributor Author

❌ Laravel 5.3 has a development dependency for phpunit/phpunit of ~5.0. You have a modified dependency for phpunit/phpunit in your composer.json. Ensure it meets the new version requirement of ~5.0.

@laravel-shift
Copy link
Contributor Author

❌ Laravel 5.3 has a development dependency for symfony/css-selector of 3.1.*. You have a modified dependency for symfony/css-selector in your composer.json. Ensure it meets the new version requirement of 3.1.*.

@laravel-shift
Copy link
Contributor Author

❌ Laravel 5.3 has a development dependency for symfony/dom-crawler of 3.1.*. You have a modified dependency for symfony/dom-crawler in your composer.json. Ensure it meets the new version requirement of 3.1.*.

@laravel-shift
Copy link
Contributor Author

laravel-shift commented Oct 19, 2016

❌ Laravel 5.3 where performs a "loose" comparison. In addition, the strict parameter was removed. If you need to perform a "strict" comparison, you can use whereStrict instead.

You should review the following usages of where to ensure you do not require "strict" compaison:

  • app/Models/IncidentTemplate.php
  • app/Models/Traits/SearchableTrait.php
  • app/Models/Subscriber.php
  • app/Models/User.php
  • app/Models/Component.php
  • app/Models/ComponentGroup.php
  • app/Models/Incident.php
  • app/Models/Subscription.php
  • app/Models/Metric.php
  • app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php
  • app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php
  • app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php
  • app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php
  • app/Settings/Repository.php
  • app/Http/Controllers/SubscribeController.php
  • app/Http/Controllers/Dashboard/IncidentController.php
  • app/Http/Controllers/Dashboard/ApiController.php
  • app/Http/Controllers/Api/IncidentController.php
  • app/Http/Controllers/StatusPageController.php
  • app/Http/Controllers/SignupController.php

@laravel-shift
Copy link
Contributor Author

laravel-shift commented Oct 19, 2016

❌ In Laravel 5.3, Eloquent scopes now respect the leading boolean of scope constraints. If you are starting your scope with an orWhere constraint it will no longer be converted to a normal where.

You should review the following usages of orWhere to ensure you're not starting your constraints with it:

  • app/Models/Incident.php
  • app/Models/Subscription.php
  • app/Http/Controllers/Dashboard/SettingsController.php

@laravel-shift
Copy link
Contributor Author

laravel-shift commented Oct 19, 2016

❌ In Laravel 5.3, the JoinClause class has been rewritten to unify its syntax with the query builder. The optional $where parameter of the on clause and the bindings property have been removed.

You should review the following usages of join to ensure you're not using these features:

  • app/Models/Subscriber.php
  • app/Models/Subscription.php

@laravel-shift
Copy link
Contributor Author

laravel-shift commented Oct 19, 2016

❌ The Query Builder returns collections, instead of plain arrays, in Laravel 5.3. You will need to upgrade your code to use collections or chain the all() method onto your query to return a plain array.

You should review the following usages of Query Builder:

  • app/Repositories/Metric/SqliteRepository.php
  • app/Repositories/Metric/MySqlRepository.php
  • app/Repositories/Metric/PgSqlRepository.php
  • app/Bus/Middleware/UseDatabaseTransactions.php

@laravel-shift
Copy link
Contributor Author

ℹ If you are using Queues, you no longer need to specify the --daemon option when calling the queue:work. This is assumed in Laravel 5.3. Use the --once option to process a single job.

If you are using the database driver, you will need to update your jobs and failed_jobs table. Review the Queue section of the Laravel 5.3 Upgrade Guide for more details and feel free to use the migrations from Laravel Shift.

@laravel-shift
Copy link
Contributor Author

ℹ Laravel 5.3 updated several of the default assets as well as adding support for Vue.js. If you are using Laravel to compile assets you may want to review the latest versions of resources/assets/js/app.js and resources/assets/sass/app.scss and update your project accordingly.

@laravel-shift
Copy link
Contributor Author

⚠ Laravel 5.3 added configuration for your application name in config/app.php. Be sure to set this value as it is used in notifications, like the password reset email.

[ci skip] [skip ci]
@jbrooksuk jbrooksuk added this to the V2.4.0 milestone Oct 19, 2016
@jbrooksuk jbrooksuk self-assigned this Oct 21, 2016
'order' => 'int',
'group_id' => 'int',
'enabled' => 'bool',
'description' => 'required|string',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be nullable|string, otherwise you're forced to provide a description for components when creating them through the API (even though you can have an empty description when creating or editing them in the dashboard).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Feel free to submit a PR :)

The command is now called CreateComponentCommand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants