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 Linter #312

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Laravel Linter #312

wants to merge 1 commit into from

Conversation

josuapsianturi
Copy link
Owner

This pull request includes changes and recommendations for crafting your application "The Laravel Way". Feel free to commit any additional changes to the shift-78475 branch.

Before merging, you need to:

  • Checkout the shift-78475 branch
  • Review all pull request comments for additional changes
  • Thoroughly test your application (no tests?, no CI?)

Much of the lint detected may be automatically fixed by running the Laravel Fixer or tasks within the Shift Workbench.

@josuapsianturi
Copy link
Owner Author

josuapsianturi commented Jan 21, 2023

❌ 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 merge 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/services.php
  • config/session.php

@josuapsianturi
Copy link
Owner Author

ℹ️ Starting with Laravel 8, the model property within factories may be removed when your models are stored within a conventional location such as app/Models. Unless your factory is for a model outside of this location, you may remove this property.

@josuapsianturi
Copy link
Owner Author

⚠️ The following controllers contain actions outside of the 7 resource actions (index, create, store, show, edit, update, destroy). For more details, review the docs or watch Cruddy by Design to see if you may rework these into resource controllers.

  • app/Http/Controllers/LoginController.php

@josuapsianturi
Copy link
Owner Author

⚠️ Shift found inline validation in the following controllers. Unless you require this level of control, you should use a Form Request to encapsulate this validation logic and keep your controller clean. You may automate this conversion with the Laravel Fixer.

  • app/Http/Controllers/NewsletterController.php
  • app/Http/Controllers/RegisterController.php
  • app/Http/Controllers/SessionsController.php

@josuapsianturi
Copy link
Owner Author

ℹ️ Shift detected controller namespaces being set in your RouteServiceProvider. Laravel 8 began registering routes using static class references instead of namespace prefixes and action strings.

@josuapsianturi
Copy link
Owner Author

ℹ️ As noted, much of the lint detected above can be automatically fixed using the Laravel Fixer. Save yourself time and clean up your codebase quickly with this new Shift.

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