Code Health #1213
marcelfolaron
started this conversation in
Ideas
Code Health
#1213
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Code health needs to be improved moving forward to rensure release stability and cadency and ensure all contributors ahve a common guide for coding standards. Here is a list of items I think we should work on. Please discuss:
Update controllers to use services only. No direct access to repositories from a controller
Controllers should only be concerned with routing and presentation logic. The only things in there should be data pulling/pushing from the service to the frontend
Create Unit Tests for all core and services
We need unit tests for all core classes as well as services. If controllers are "dumbbed" down they can be tested as part of integration tests
Create code documentation
Add phpdoc comments to all classes and methods
Services implement service interface
To ensure consistency between services we should create a service interface that each service implements
Follow PSR-12 coding style standards
Using tools such as PHPStand or Codesniffer we should align our coding standards
Replace entity arrays with entity objects from repo to frontend
Our main business objects should be represented as objects and not as arrays.
Any other thoughts? Suggestions?
Beta Was this translation helpful? Give feedback.
All reactions