This document is designed to provide guidelines for the development and architecture of the CMS. None of the guidelines are hard rules and this document is a constant work in progress.
- All upstream integrations should be documented and monitored.
- All downstream integrations should be documented.
- Integrations with external systems should not occur in the direct flow of an editor.
- The Event based versions of a hook using the
hook_event_dispatcher
should be used instead of the direct hook implementation. - All code which contains business logic must live in a class instead of a function.
- Classes and methods should follow SOLID principles.
- Methods containing business logic must have
phpunit
tests. -
- Value objects should be used instead of arrays to store data.
- Code should be read as a story.
- Comments should explain the
why
while the code explains the what/how. - Nested
if
s should be avoided. - Nested
foreach
loops should be avoided.
inspired by Clean Code