Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Review best practice docs #323

@maxime-rainville

Description

@maxime-rainville

There's a lot of common best practices we try to follow within the team but that we don't necessarily document or have a formal way to enforced. e.g.:

  • Use ::create() to instantiate new DataObject rather new- this is in debate to some extent
  • Use the Injector to bootstrap services even for third party objects
  • Explicitly require any API you call in your composer.json file

While technically those things are not essential, they generally lead to more robust code. By documenting those explicitly we can save ourselves discussion in peer review and encourage quality code in our OSS product and in our bespoke projects.

Acceptance criteria

  • A list of best practices has been establish and make general consensus among core committers and the team.
  • A page has been set up in the doc to record the best practices.
  • The page makes clear that best practices can be overridden in individual circumstances and are not hard rules.
  • Best practices are aimed towards both core modules and bespoke projects.

Notes

PR

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions