Skip to content

Upgrade Checker #167

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

Merged
merged 14 commits into from
Sep 4, 2020
Merged

Upgrade Checker #167

merged 14 commits into from
Sep 4, 2020

Conversation

Jnesselr
Copy link
Contributor

This pull request contains changes and comments noting incompatible or deprecated code by the Upgrade Checker. You should review each comment and commit changes to the shift-29245 branch before merging.

If you need help with your upgrade, check out the Human Shifts. You may also join the Shifty Coders Slack workspace to level-up your Laravel skills.

@Jnesselr
Copy link
Contributor Author

⚠️ Laravel 5.8 correctly pluralizes multi-word model names ending in a word with an irregular pluralization. For example, Laravel 5.7 pluralized the table name for the UserFeedback model as user_feedbacks. Starting with Laravel 5.8, the table for the UserFeedback model is correctly pluralized as user_feedback.

If your tables were named using this irregular pluralization, you should rename your table or set the $table property for your model. If you were overriding this incorrect behavior by setting the $table property, you may remove it and now rely on the framework.

@Jnesselr
Copy link
Contributor Author

⚠️ Shift found potential uses of the email validation rule. In Laravel 5.8, the default validation for this rule changed to be inline with the RFC. As such, it allows alternative formats like someone@domain.

If you wish to preserve the original behavior, you may use email:filter instead.

@Jnesselr
Copy link
Contributor Author

❌ The Illuminate\Http\Resources\Json\Resource class was deprecated in Laravel 5.6 and removed in Laravel 7. Your resources should extend the Illuminate\Http\Resources\Json\JsonResource class instead.

@Jnesselr
Copy link
Contributor Author

ℹ️ Laravel 7 upgraded to Symfony 5 which passes instances of the Throwable interface instead of Exception instances to core components.

You should review your Handler.php and convert any uses of the Exception.

@Jnesselr
Copy link
Contributor Author

Jnesselr commented Jun 17, 2020

❌ Shift found files using the Route methods within your app folder. You should consolidate your routes into one of the default route/api.php or route/web.php route files.

  • app/Providers/RouteServiceProvider.php

@Jnesselr
Copy link
Contributor Author

Jnesselr commented Jun 17, 2020

❌ Shift found references to Illuminate\Http\Resources\Json\Resource. This has been replaced by Illuminate\Http\Resources\Json\JsonResource.

  • app/Http/Resources/BotCollection.php

@Jnesselr
Copy link
Contributor Author

⚠️ Your app/Console/Kernel.php differs from the Laravel default. You should compare your app/Console/Kernel.php and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

⚠️ Your app/Exceptions/Handler.php differs from the Laravel default. You should compare your app/Exceptions/Handler.php and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

⚠️ Your app/Http/Controllers/Controller.php differs from the Laravel default. You should compare your app/Http/Controllers/Controller.php and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

⚠️ Your app/Http/Kernel.php differs from the Laravel default. You should compare your app/Http/Kernel.php and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

⚠️ Your artisan differs from the Laravel default. You should compare your artisan and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

⚠️ Your bootstrap/app.php differs from the Laravel default. You should compare your bootstrap/app.php and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

⚠️ Your phpunit.xml differs from the Laravel default. You should compare your phpunit.xml and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

⚠️ Your public/.htaccess differs from the Laravel default. You should compare your public/.htaccess and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

⚠️ Your public/index.php differs from the Laravel default. You should compare your public/index.php and with the latest version and make any updates.

@Jnesselr
Copy link
Contributor Author

Jnesselr commented Jun 17, 2020

❌ The following configuration files differ from the Laravel defaults. If you are modifying configuration values directly, consider using an environment variable instead to keep these files maintainable. You should compare your configuration files against the latest version and make any updates.

  • config/app.php
  • config/auth.php
  • config/broadcasting.php
  • config/cache.php
  • config/database.php
  • config/filesystems.php
  • config/hashing.php
  • config/logging.php
  • config/mail.php
  • config/queue.php
  • config/services.php
  • config/session.php
  • config/view.php

@Jnesselr
Copy link
Contributor Author

Jnesselr commented Jun 17, 2020

❌ The container's make method no longer accepts a second parameter to pass arguments into the container in Laravel 5.4. Ideally, you should construct this object in another way. However, this functionality was reintroduced by using the makeWith method instead.

Shift found potential uses of passing argument to make in:

  • app/Http/Controllers/JobController.php
  • app/Http/Requests/BotUpdateRequest.php
  • app/StateTransitions/Bot/ToIdle.php

@Jnesselr
Copy link
Contributor Author

ℹ️ Shift noticed you have additional namespaces in your application. You should consider using the Consolidate Namespaces Shift to simplify your namespaces into the default Laravel App namespace.

@Jnesselr
Copy link
Contributor Author

Jnesselr commented Sep 4, 2020

Landing anyway, I'll fix the Travis CI and Codacy issues later.

@Jnesselr Jnesselr merged commit 75c8d19 into v2.0-dev Sep 4, 2020
@Jnesselr Jnesselr deleted the shift-29245 branch September 4, 2020 06:21
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.

2 participants