Skip to content

Commit

Permalink
Merge pull request #1090 from W0rma/make-container-mandatory
Browse files Browse the repository at this point in the history
Make container in costructor of ContainerRepositoryFactory mandatory
  • Loading branch information
ostrolucky committed Dec 11, 2019
2 parents eab9980 + 3aeb3dc commit d521b73
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Repository/ContainerRepositoryFactory.php
Expand Up @@ -25,14 +25,8 @@ final class ContainerRepositoryFactory implements RepositoryFactory
/**
* @param ContainerInterface $container A service locator containing the repositories
*/
public function __construct(ContainerInterface $container = null)
public function __construct(ContainerInterface $container)
{
// When DoctrineBundle requires Symfony 3.3+, this can be removed
// and the $container argument can become required.
if ($container === null) {
throw new InvalidArgumentException(sprintf('The first argument of %s::__construct() is required on Symfony 3.3 or higher.', self::class));
}

$this->container = $container;
}

Expand Down

0 comments on commit d521b73

Please sign in to comment.