Skip to content

Commit

Permalink
[Billing] Don't include doctrine when billabear mode is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
that-guy-iain committed Dec 2, 2024
1 parent 7254cc1 commit 6d5e9c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Parthenon/DependencyInjection/Modules/Billing.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public function handleConfiguration(array $config, ContainerBuilder $container):
$container->registerForAutoconfiguration(CounterInterface::class)->addTag('parthenon.billing.plan.counter');
$container->registerForAutoconfiguration(HandlerInterface::class)->addTag('parthenon.billing.webhooks.handler');
$container->registerForAutoconfiguration(ProcessorInterface::class)->addTag('parthenon.billing.billabear.webhooks.handler');
$container->setParameter('parthenon_billing_enabled', true);

$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../../Resources/config'));
$loader->load('services/billing.xml');
Expand All @@ -136,10 +135,13 @@ public function handleConfiguration(array $config, ContainerBuilder $container):
$loader->load('services/billing/billabear.xml');
$container->setAlias(PlanManagerInterface::class, CachedPlanManager::class);
$this->handleBillaBearConfig($billingConfig['billabear'], $container);
$container->setParameter('parthenon_billing_enabled', false);
} elseif ('athena' === strtolower($billingConfig['plan_management'])) {
$container->setParameter('parthenon_billing_enabled', true);
$loader->load('services/billing/athena_plans.xml');
$container->setAlias(PlanManagerInterface::class, CachedPlanManager::class);
} else {
$container->setParameter('parthenon_billing_enabled', true);
$container->setAlias(PlanManagerInterface::class, PlanManager::class);
}

Expand Down

0 comments on commit 6d5e9c6

Please sign in to comment.