magento / magento/magento-coding-standard
[Documentation] Document Object ManagerSniff
- Dominant language
- PHP
- Stars
- 375
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
Describe why the use of Object Manager is considered as a bad practice.
### Acceptance criteria
1. `ObjectManagerSniff.md` file is created.
2. Explanation about why the use of Object Manager is discouraged.
3. _Good_ and _bad_ code snippets provided.
[ExtDN's TemplateObjectManagerSniff.md](https://github.com/extdn/extdn-phpcs/blob/master/Extdn/Sniffs/Templates/TemplateObjectManagerSniff.md) can be used as a good example.
Contributor guide
Research direction
Start by reviewing ExtDN's TemplateObjectManagerSniff.md, linked in the issue, for structure and level of explanation. Create ObjectManagerSniff.md with why Object Manager is discouraged and include both good and bad code snippets. Done means the file exists and all three acceptance criteria are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100