-
Notifications
You must be signed in to change notification settings - Fork 38
Rules - Add Laravel 11 best practices #15
base: main
Are you sure you want to change the base?
Conversation
|
This is my first PR, please be kind :) |
alexsoyes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh voilà, chaud de splitter tout ça ? On peut le faire ensemble si tu veux !
| @@ -0,0 +1,147 @@ | |||
| --- | |||
| description: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu peux supprimer ça :)
| description: Apply Laravel 11 best practices for project structure, configuration, business logic, controllers, templates, forms, internationalization, security, web assets, and tests in all PHP source files. Ensures maintainability, security, and consistency across Laravel applications by following official recommendations. | ||
| globs: src/**/*.php | ||
| alwaysApply: false | ||
| --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double ligne ici
| - Maximum 5 parameters per method | ||
| - Maximum 300 lines per class | ||
| - Maximum 10 classes per directory | ||
| - Use PSR-12 coding standards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A partir d'ici c'est good
| - Keep listeners focused on single responsibility | ||
|
|
||
| Coding Standards: | ||
| - Use strict types everywhere: `declare(strict_types=1);` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est dans des règles de coding standards globales, pas besoin de les repréciser ici :)
| alwaysApply: false | ||
| --- | ||
|
|
||
| Project Structure: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas mal du tout, tu peux demander à l'agent de te regrouper les règles et de te spliter ça en plusieurs petits fichiers, ça te permettra de target uniquement les contrôleurs quand tu as besoin, l'ORM d'un autre côté etc
| - Use interfaces for better testability | ||
| - Bind interfaces to implementations in service providers | ||
|
|
||
| Models & Eloquent: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ça va avec l'ORM plus bas, pense à merge :)
|
Merci pour tes retours ! À mon retour de vacs je m'en occupe! |
No description provided.