Skip to content
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

Make container in costructor of ContainerRepositoryFactory mandatory #1090

Merged
merged 1 commit into from Dec 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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