Skip to content

Conversation

@loic425
Copy link
Member

@loic425 loic425 commented Jul 29, 2025

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets
License MIT

It's the same feature as this APIP one.
We need this feature for this issue.

@loic425 loic425 marked this pull request as draft July 29, 2025 07:41
@loic425 loic425 force-pushed the mutators branch 2 times, most recently from 5898f27 to a6135b8 Compare July 29, 2025 07:52
@loic425 loic425 force-pushed the mutators branch 4 times, most recently from f2a8714 to 39d41d1 Compare October 28, 2025 09:15
@loic425 loic425 marked this pull request as ready for review October 28, 2025 09:16
/**
* @internal
*/
final class OperationResourceMutatorCollection implements OperationMutatorCollectionInterface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's Operation Mutator, but Operation Resource Mutator Collection -- how name was derived?

If resource part is necessary, should it be

--- OperationResourceMutatorCollection
+++ ResourceOperationMutatorCollection

like so?

Copy link
Member Author

@loic425 loic425 Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was an issue during name refactoring at some point. We should rename them on APIP too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed these 2 class names.

$container->addCompilerPass(new FallbackToKernelDefaultLocalePass());
$container->addCompilerPass(new DoctrineContainerRepositoryFactoryPass());
$container->addCompilerPass(new DoctrineTargetEntitiesResolverPass(new TargetEntitiesResolver()), PassConfig::TYPE_BEFORE_OPTIMIZATION, 1);
$container->addCompilerPass(new MutatorPass());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mutator is not specific enough name when used outside of Sylius\Resource\Metadata dir.

For example,

Suggested change
$container->addCompilerPass(new MutatorPass());
$container->addCompilerPass(new MetadataMutatorPass());

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment on lines 66 to 69
/**
* @var Operation $operation
* @var string $key
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part necessary? Doesn't Operations have any internal type hints to handle this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

/**
* @internal
*/
final class ResourceResourceMutatorCollection implements ResourceMutatorCollectionInterface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming scheme doesn't make sense to me, but I'm a bit of out the loop on metadata

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@loic425 loic425 force-pushed the mutators branch 4 times, most recently from 1c3c841 to 360a824 Compare October 30, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants