doctrine/DoctrineMongoDBBundle

Remove usage of the whole container

Closed this issue · 3 comments

Right now CacheWarmers receive the whole container and also in Command:

abstract class DoctrineODMCommand extends Command implements ContainerAwareInterface
{
use ContainerAwareTrait;

it would be nice to inject only the used services and parameters and remove the usage of the whole container.

stale commented

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

This should be aiming v5.0 because commands are marked as @internal since then and container-related methods are marked for removal in v5:

/**
* @deprecated since version 4.4
*/
public function setContainer(?ContainerInterface $container = null)
{
trigger_deprecation(
'doctrine/mongodb-odm-bundle',
'4.4',
'The "%s" method is deprecated and will be dropped in DoctrineMongoDBBundle 5.0.',
__METHOD__
);
$this->container = $container;
}