From 6d5e9c69077164d13ad282c03d1077dfde473fbe Mon Sep 17 00:00:00 2001 From: Iain Date: Mon, 2 Dec 2024 08:02:54 +0100 Subject: [PATCH] [Billing] Don't include doctrine when billabear mode is enabled --- src/Parthenon/DependencyInjection/Modules/Billing.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Parthenon/DependencyInjection/Modules/Billing.php b/src/Parthenon/DependencyInjection/Modules/Billing.php index ec7e9a9f..9701e3a5 100644 --- a/src/Parthenon/DependencyInjection/Modules/Billing.php +++ b/src/Parthenon/DependencyInjection/Modules/Billing.php @@ -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'); @@ -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); }