Standards used @ Galvão Desenvolvimento Ltda.
- Security first, then quality and only then everything else. Everything done as simple as possible: K.I.S.S.;
- Think first, then code.
- Documentation must be created before, improved during and indexed after development;
- Any tools that might help are acceptable, blindly pasting code isn't;
- The right tool is the one that achieves the goal and is known or reasonably "learnable" within the project scope;
- Honesty always, but honesty doesn't equal rudeness;
- Reasonable investments and deadlines only change if the scope changes as well: that's why they're called reasonable;
- Never pretend to know what you don't; Always learn what you can;
- Popularity is an important metric, but never the most important;
- Made a mistake? Do a Post-mortem. Mistakes are always welcome: if you don't make them you don't learn.
- Logs are always stored on disk, at the
data/logfolder; - For complex projects, logs may be segmented in subfolders (see the
streamsstatic attribute of MonologWrapper). - Log filenames are always in the
Y-m-d.logformat; - Log messages are in the following format:
$lineFormat = "%datetime% - [ %level_name% ]: %message%\nDATA:\n%extra%\n\n";
- Timestamps (the
%datetime%placeholder in Monolog) are always stored in the following format:H:i:s; - Timestamps may use GMT offset indication, if needed. In this case, the offset should be represented as
Hm(no semi-colon, the O format); - Log files should be periodically rotated and backed up (see the LogRotate project).
PHP - MonologWrapper
- Versioning is always done using Semantic Versioning;
- There's always a branching strategy in place (See the g-flow project)