Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review best practice docs #323

Closed
maxime-rainville opened this issue Jul 5, 2023 · 1 comment
Closed

Review best practice docs #323

maxime-rainville opened this issue Jul 5, 2023 · 1 comment

Comments

@maxime-rainville
Copy link
Contributor

maxime-rainville commented Jul 5, 2023

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

@maxime-rainville maxime-rainville changed the title Document best practices Review best practices Jul 9, 2023
@GuySartorelli GuySartorelli changed the title Review best practices Review best practice docs Jul 11, 2023
@GuySartorelli GuySartorelli transferred this issue from silverstripe/.github Aug 13, 2023
@emteknetnz emteknetnz self-assigned this Nov 3, 2023
@emteknetnz emteknetnz removed their assignment Nov 6, 2023
@sabina-talipova sabina-talipova removed their assignment Nov 8, 2023
@emteknetnz emteknetnz removed their assignment Nov 13, 2023
@GuySartorelli
Copy link
Member

Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants