-
Notifications
You must be signed in to change notification settings - Fork 203
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
EZP-31279: Injected content domain mappers into the Repository #2913
EZP-31279: Injected content domain mappers into the Repository #2913
Conversation
122a4cb
to
d549402
Compare
467b228
to
6d75327
Compare
@adamwojs I've resolved conflict with #2844 and injected proxy factory using setter via da0f7c2. The downside to that is having the proxy factory built both in Additionally fixed minor type-hinting issue via 6d75327. |
…tTypeDomainMapper
6d75327
to
1e4ee38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Approved on eZ Platform EE master.
master (8.0@dev)
for eZ Platformv3.0
Summary
This PR makes Content Type and Content domain mappers injectable Symfony Services and injects them into the Repository instead of building them on the fly.
Moreover those mappers were moved into the proper namespace:
\eZ\Publish\Core\Repository\Helper\ContentTypeDomainMapper
into
\eZ\Publish\Core\Repository\Mapper\ContentTypeDomainMapper
,\eZ\Publish\Core\Repository\Helper\DomainMapper
into
eZ\Publish\Core\Repository\Mapper\ContentDomainMapper
(also renamed for better clarity).Please see distinct commits for all the changes.
Background
It's a part of a larger decoupling story. The major issue with the current architecture is a lot of cyclic dependencies and a lot of changes needed to modify direct dependencies of Repository. The good example is Content Thumbnail feature which has been implemented recently. To inject
ThumbnailStrategy
service into theContentDomainMapper
we had to modify:RepositoryFactory
(x2),Repository
, related tests and the domain mapper itself. This is very much not SOLID and causes cyclic dependency issues. With the changes from this PRThumbnailStrategy
can be removed fromRepository
as a follow-up. This is just one example of course.QA
You can use the
qa-cumulative-ezp-31278-31279-decouple-content-mappers-limitation-svc
branch to test both #2913 and #2914TODO:
$ composer fix-cs
).