Skip to content

Commit

Permalink
fix: Fixing DI
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsorst committed Mar 19, 2024
1 parent 84c30ec commit 0506c50
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/DependencyInjection/DdrBridgeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function load(array $configs, ContainerBuilder $container): void
$userConfig = $config['user'] ?? null;
$userEnabled = null !== $userConfig && true === $userConfig['enabled'];
$container->setParameter(ParamName::USER_ENABLED, $userEnabled);
$container->setParameter(ParamName::USER_LOGIN_LINK_ENABLED, false);
if ($userEnabled) {
$this->configureUser($userConfig, $container, $loader);
}
Expand Down
3 changes: 2 additions & 1 deletion src/Routing/DdrBridgeLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Dontdrinkandroot\BridgeBundle\Routing;

use Dontdrinkandroot\BridgeBundle\Controller\HealthAction;
use Dontdrinkandroot\BridgeBundle\Controller\Security\LoginLink\CheckAction;
use Dontdrinkandroot\BridgeBundle\Controller\Security\LoginAction;
use Dontdrinkandroot\BridgeBundle\Controller\Security\LoginLink\CheckAction;
use Dontdrinkandroot\BridgeBundle\Controller\Security\LoginLink\RequestAction;
use Dontdrinkandroot\BridgeBundle\Model\Container\RouteName;
use Dontdrinkandroot\BridgeBundle\Model\Container\RoutePath;
Expand All @@ -24,6 +24,7 @@ public function __construct(
private readonly bool $userEnabled,
private readonly bool $loginLinkEnabled
) {
parent::__construct();
}

#[Override]
Expand Down
2 changes: 1 addition & 1 deletion tests/Acceptance/BaseTemplateTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Acceptance;
namespace Dontdrinkandroot\BridgeBundle\Tests\Acceptance;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

Expand Down
2 changes: 1 addition & 1 deletion tests/TestApp/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return function (RoutingConfigurator $routes): void {
$routes->import('@DdrBridgeBundle/config/routes/health.php');
$routes->import('.', 'ddr_crud');
$routes->import('.', 'ddr_bridge');
$routes->import('.', 'api_platform')->prefix('/api');
$routes
->add('ddr_bridge.test.base_template', '/base_template')
Expand Down

0 comments on commit 0506c50

Please sign in to comment.