Skip to content

Commit

Permalink
Make ProjectFactory overridable (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
adpeyre authored May 28, 2024
1 parent 5604be6 commit 3c683bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/DependencyInjection/FirebaseExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ private function registerService(string $name, string $postfix, array $config, s
$projectServiceId = \sprintf('%s.%s.%s', $this->getAlias(), $name, $postfix);
$isPublic = $config['public'];

$factory = new Definition(ProjectFactory::class);
$factory->setPublic(false);
$factory = $container->getDefinition(ProjectFactory::class);

if ($config['verifier_cache'] ?? null) {
$factory->addMethodCall('setVerifierCache', [new Reference($config['verifier_cache'])]);
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/firebase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<services>
<service id="Kreait\Firebase\Factory" class="%kreait.firebase.factory%" />

<service id="Kreait\Firebase\Symfony\Bundle\DependencyInjection\Factory\ProjectFactory" class="%kreait.firebase.bundle.project_factory%">
<service id="Kreait\Firebase\Symfony\Bundle\DependencyInjection\Factory\ProjectFactory" class="%kreait.firebase.bundle.project_factory%" public="false">
<argument type="service" id="Kreait\Firebase\Factory" />
</service>
</services>
Expand Down

0 comments on commit 3c683bf

Please sign in to comment.