feat(metadata) Customize Resource & operations#1055
feat(metadata) Customize Resource & operations#1055NoResponseMate merged 3 commits intoSylius:1.14from
Conversation
5898f27 to
a6135b8
Compare
f2a8714 to
39d41d1
Compare
| /** | ||
| * @internal | ||
| */ | ||
| final class OperationResourceMutatorCollection implements OperationMutatorCollectionInterface |
There was a problem hiding this comment.
It's Operation Mutator, but Operation Resource Mutator Collection -- how name was derived?
If resource part is necessary, should it be
--- OperationResourceMutatorCollection
+++ ResourceOperationMutatorCollectionlike so?
There was a problem hiding this comment.
I think this was an issue during name refactoring at some point. We should rename them on APIP too.
There was a problem hiding this comment.
I've fixed these 2 class names.
src/Bundle/SyliusResourceBundle.php
Outdated
| $container->addCompilerPass(new FallbackToKernelDefaultLocalePass()); | ||
| $container->addCompilerPass(new DoctrineContainerRepositoryFactoryPass()); | ||
| $container->addCompilerPass(new DoctrineTargetEntitiesResolverPass(new TargetEntitiesResolver()), PassConfig::TYPE_BEFORE_OPTIMIZATION, 1); | ||
| $container->addCompilerPass(new MutatorPass()); |
There was a problem hiding this comment.
Mutator is not specific enough name when used outside of Sylius\Resource\Metadata dir.
For example,
| $container->addCompilerPass(new MutatorPass()); | |
| $container->addCompilerPass(new MetadataMutatorPass()); |
src/Component/src/Metadata/Mutator/OperationMutatorCollectionInterface.php
Outdated
Show resolved
Hide resolved
src/Component/src/Metadata/Mutator/ResourceMutatorCollectionInterface.php
Show resolved
Hide resolved
| /** | ||
| * @var Operation $operation | ||
| * @var string $key | ||
| */ |
There was a problem hiding this comment.
Is this part necessary? Doesn't Operations have any internal type hints to handle this?
src/Component/src/Metadata/Resource/Factory/MutatorResourceMetadataCollectionFactory.php
Show resolved
Hide resolved
| /** | ||
| * @internal | ||
| */ | ||
| final class ResourceResourceMutatorCollection implements ResourceMutatorCollectionInterface |
There was a problem hiding this comment.
Naming scheme doesn't make sense to me, but I'm a bit of out the loop on metadata
src/Component/src/Metadata/Mutator/ResourceMutatorCollection.php
Outdated
Show resolved
Hide resolved
1c3c841 to
360a824
Compare
src/Component/src/Metadata/Mutator/OperationMutatorCollectionInterface.php
Show resolved
Hide resolved
src/Component/src/Metadata/Mutator/OperationMutatorCollectionInterface.php
Outdated
Show resolved
Hide resolved
…nterface.php Co-authored-by: Dmitri Perunov <diimpp@gmail.com>
It's the same feature as this APIP one.
We need this feature for this issue.