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 #119

Merged
merged 1 commit into from
Jan 18, 2018
Merged

Laravel Linter Shift #119

merged 1 commit into from
Jan 18, 2018

Conversation

HDVinnie
Copy link
Collaborator

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 shift-5928 branch before merging.

If there were items you feel could have been detected, please send your feedback to [email protected] or via Twitter.

Laravel 5 added several new helper functions, including:

- `view()`
- `response()`
- `redirect()`
- `config()`
- String functions

Review the [helpers][1] documentation for more details.

[1]: https://laravel.com/docs/5.0/helpers
@HDVinnie
Copy link
Collaborator Author

HDVinnie commented Jan 18, 2018

❌ Since Laravel 5, output is escaped when using the {{ }} Blade directive. As such, the use of {{{ }}} is no longer necessary. You should use {{ }} instead or {!! !!} to
display raw, unescaped output. The following Blade templates contain {{{ }}}:

  • ./resources/views/Staff/logs/index.blade.php
  • ./resources/views/partials/top_nav.blade.php
  • ./resources/views/user/active.blade.php
  • ./resources/views/user/history.blade.php
  • ./resources/views/user/profil.blade.php
  • ./resources/views/user/uploads.blade.php

@HDVinnie
Copy link
Collaborator Author

HDVinnie commented Jan 18, 2018

ℹ Laravel 5.2 added the env configuration option. Laravel recommends you only use env() within configuration files and use config() otherwise.

Shift found potential uses of env() in:

  • app/Console/Commands/autoGraveyard.php
  • app/Console/Commands/removeFeaturedTorrent.php
  • app/Http/Controllers/Auth/RegisterController.php
  • app/Http/Controllers/BonusController.php
  • app/Http/Controllers/CommentController.php
  • app/Http/Controllers/ForumController.php
  • app/Http/Controllers/RequestController.php
  • app/Http/Controllers/ShoutboxController.php
  • app/Http/Controllers/Staff/PollController.php
  • app/Http/Controllers/TorrentController.php
  • app/Listeners/AchievementUnlocked.php
  • app/Mail/ActivateUser.php
  • app/Notifications/NewTorrentComment.php
  • app/Services/TorrentTools.php

@HDVinnie
Copy link
Collaborator Author

HDVinnie commented Jan 18, 2018

❌ Shift found references to fetch(). This has been replaced by pluck().

  • app/Http/Controllers/ShoutboxController.php

@HDVinnie
Copy link
Collaborator Author

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

@HDVinnie
Copy link
Collaborator 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.

@HDVinnie
Copy link
Collaborator 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.

@HDVinnie
Copy link
Collaborator 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.

@HDVinnie
Copy link
Collaborator Author

HDVinnie commented Jan 18, 2018

❌ The following configuration files differ from the Laravel 5.5 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.5 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
  • config/view.php

@HDVinnie
Copy link
Collaborator Author

HDVinnie commented Jan 18, 2018

❌ Support for later, send, and queue on the Mail facade has changed in Laravel 5.4. You should upgrade your project to use Mailables.

Shift found potential uses of these methods in:

  • app/Jobs/SendActivationMail.php

@HDVinnie
Copy link
Collaborator Author

HDVinnie commented Jan 18, 2018

❌ PHP syntax errors were detected after running your Shift. Often these are misplaced lines due to an unexpected code format.

I found PHP syntax errors in:

  • app/Http/Controllers/InviteController.php

@HDVinnie HDVinnie self-assigned this Jan 18, 2018
@HDVinnie HDVinnie merged commit 4029c9f into master Jan 18, 2018
HDVinnie added a commit that referenced this pull request Jan 18, 2018
@HDVinnie HDVinnie deleted the shift-5928 branch January 19, 2018 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants