magento / magento/community-features
PSR-11 Support / Custom factories
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 46
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
We're using third party libraries more and more because Magento is pretty much completely compatible with third party libraries. Unfortunately I see more libraries using PSR-11 and that is causing headaches when trying to use those libraries.
For example, I'm using this library: https://github.com/prooph/event-sourcing
This library makes use of the ContainerInterface to instantiate its objects.. it would be nice if Magento would support custom factories for objects.
Not sure how that would exactly work, how the config would be used in the config, etc.
Config examples:
- Zend https://github.com/prooph/proophessor-do/blob/master/config/autoload/prooph.global.php
- Symfony https://github.com/prooph/proophessor-do-symfony/blob/master/config/services.yaml
Maybe define something like:
<type name="ReachDigital\ProophJira\Infrastructure\Repository\EventStoreUserCollection">
<factory type="Prooph\EventSourcing\Container\Aggregate\AggregateRepositoryFactory"/>
</type>
This probably needs to be thought out more ;)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the PSR-11 use case and the linked Zend prooph.global.php and Symfony services.yaml configuration examples. Define how Magento configuration would support custom factories and what the expected behavior and acceptance tests should be before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100