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 Shift #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Laravel Linter Shift #19

wants to merge 2 commits into from

Conversation

laravel-shift
Copy link
Owner

This pull request contains code changes and comments for code detected as incompatible or unrecommended by the Laravel Linter. You should review each comment and commit changes to the laravel-linter-shift branch before merging.

If there were items you feel could have been detected, please leave a comment on this pull request to help improve 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
Since Laravel 5.1 requires PHP 5.5.9+ using the *new* static `class`
property to get the fully qualified name of a class is preferred
over using class name strings.
@laravel-shift
Copy link
Owner Author

⚠ Your Laravel framework dependency is not set to the latest version in Composer. Unless you have a requirement for using a specific version of Laravel, you should set this to "laravel/framework": "5.3.*".

@laravel-shift
Copy link
Owner Author

ℹ Your Laravel version is less than the latest version (5.3). Use Laravel Shift to not only upgrade your project to the latest version of Laravel, but resolve most of the lint detected here.

@laravel-shift
Copy link
Owner Author

❌ Your config/app.php registers the following providers which are no longer used in the latest version of Laravel:

  • Illuminate\Foundation\Providers\ArtisanServiceProvider
  • Illuminate\Routing\ControllerServiceProvider

@laravel-shift
Copy link
Owner Author

❌ Your config/app.php registers the following aliases which are no longer used in the latest version of Laravel:

  • Illuminate\Routing\Controller
  • Illuminate\Support\Facades\Input

@laravel-shift
Copy link
Owner Author

❌ Your app/Http/Controllers/Controller.php is declared as an abstract class. This class is no longer abstract as of Laravel 5.2.

@laravel-shift
Copy link
Owner Author

⚠ Laravel 5.3 streamlined the app folder structure by removing folders which were empty by default. Instead, these folders are created when you generate the respective classes using artisan. Your app contains the following empty folders which you should review and remove if not used.

  • app/Jobs
  • app/Events
  • app/Listeners
  • app/Policies

@laravel-shift
Copy link
Owner Author

❌ Laravel 5.3 now includes a top-level routes folder for storing your app routes. You should create this folder and move your routes into one of the default api.php or web.php route files.

@laravel-shift
Copy link
Owner Author

❌ I 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/Http/routes.php

@laravel-shift
Copy link
Owner Author

⚠ It appears your User model does not extend Authenticatable. Unless you have a custom User model, this could mean your class needs update. You should should compare yours with the latest version and make any updates.

@laravel-shift
Copy link
Owner Author

❌ Laravel 5.3 replaced app/Http/Auth/AuthController.php and app/Http/Auth/PasswordController.php with four controllers to separate concerns. Your application is missing the following new Auth controllers. You should copy the latest versions and merge any customizations from your previous controllers.

  • app/Http/Controllers/Auth/ForgotPasswordController.php
  • app/Http/Controllers/Auth/LoginController.php
  • app/Http/Controllers/Auth/RegisterController.php
  • app/Http/Controllers/Auth/ResetPasswordController.php

@laravel-shift
Copy link
Owner Author

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

@laravel-shift
Copy link
Owner 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.

@laravel-shift
Copy link
Owner 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.

@laravel-shift
Copy link
Owner 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.

@laravel-shift
Copy link
Owner Author

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

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

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.

1 participant