The phd repository contains the following main branches:
- master (development, unstable)
- x.y (alpha, beta, RC, stable releases)
- PSR-2
- all code, variables, tables, databases, constants - everything in the source code MUST BE written and named in English
- resources SHOULD NOT be loaded from a server or CDN during development & testing
- migrations MUST NOT be changed after they are comitted and pushed
- migrations MUST NOT use model classes
- committed code MUST NOT contain secrets
- classes MUST use English names
- variables in code SHOULD use
camelCase - database properties SHOULD use
$this->table_field
- MUST add
Testerclasses to the repository - SHOULD use
Yii::info()orYii::trace(), NOTYii::getLogger->(..., ..., ...) - SHOULD NOT use
application.language = nullwithcodemix/yii2-localeurls - SHOULD NOT use static
::className()calls in application configuration - Console commands SHOULD print a newline at the end of their output
$this->stdout("Done".PHP_EOL)
- references SHOULD NOT use absolute URLs
-
If attributes in Twig templates need to be translated and scanned by the Translatemanager module you need to use the following syntax
data-content={{ t('catalogue', '__TOOLTIP_TEXT__' | escape('html_attr')) }}
- CSS framework core classes, eg.
container,row,col-*MUST NOT be modified - SHOULD use hyphens for CSS classes and ID's i.e.
.my-classand#my-id - https://github.com/CSSLint/csslint/wiki/disallow-ids-in-selectors
- providers MUST NOT be copied into the project, may can extend a new class
- SHOULD contain
Idcolumns
- Tests MUST NOT use any programming logic
- Functional and E2e tests SHOULD use Cest files
- Functional and E2e tests SHOULD NOT have more than 20 steps
- host-volumes MUST NOT overlap
- host-volumes SHOULD NOT contain single files
- All production images MUST BE tagged
README.mdin project root (max. 300 lines)docs/detailed project documentationdocs/README.mdindexdocs/troubleshooting.md"Esoteric features"
- Source-code docblocks
- camelCase_id
- MUST USE non-project specific default values
- SHOULD have an idempotent setup (see
AppCommand)