Skip to content

Commit 9faf049

Browse files
committed
4565: Fixed dependencies issues in prod
1 parent e18c16d commit 9faf049

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

config/services.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ services:
3838
# Specify primary UserProviderInterface
3939
Symfony\Component\Security\Core\User\UserProviderInterface: '@security.user.provider.concrete.app_user_provider'
4040

41-
Symfony\Component\HttpKernel\Profiler\Profiler: '@profiler'
42-
4341
# Make classes in src/ available to be used as services
4442
# this creates a service per class whose id is the fully-qualified class name
4543
App\:

config/services_dev.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
services:
2+
Symfony\Component\HttpKernel\Profiler\Profiler: '@profiler'

src/Controller/ClientController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
class ClientController extends AbstractController
1212
{
1313
public function __construct(
14+
private readonly ?Profiler $profiler = null,
1415
private readonly int $loginCheckTimeout,
1516
private readonly int $refreshTokenTimeout,
1617
private readonly int $releaseTimestampIntervalTimeout,
@@ -21,9 +22,10 @@ public function __construct(
2122
private readonly array $logging,
2223
) {}
2324

24-
public function __invoke(Profiler $profiler): Response
25+
public function __invoke(): Response
2526
{
26-
$profiler->disable();
27+
$this->profiler?->disable();
28+
2729
return $this->render('client.html.twig', [
2830
'config' => json_encode([
2931
"loginCheckTimeout" => $this->loginCheckTimeout,

src/Controller/TemplateController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TemplateController extends AbstractController
1313
public function __construct(
1414
) {}
1515

16-
public function __invoke(Profiler $profiler): Response
16+
public function __invoke(?Profiler $profiler): Response
1717
{
1818
$profiler->disable();
1919
return $this->render('template.html.twig');

src/DataFixtures/Loader/DoctrineOrmLoaderDecorator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Psr\Log\LoggerInterface;
1414
use Symfony\Bundle\FrameworkBundle\Console\Application;
1515
use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
16+
use Symfony\Component\DependencyInjection\ContainerInterface;
1617

1718
/**
1819
* Decorator class for DoctrineOrmLoader.
@@ -23,7 +24,7 @@
2324
* @implements AliceBundleLoaderInterface
2425
* @implements LoggerAwareInterface
2526
*/
26-
#[AsDecorator(decorates: 'hautelook_alice.loader')]
27+
#[AsDecorator(decorates: 'hautelook_alice.loader', onInvalid: ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]
2728
class DoctrineOrmLoaderDecorator implements AliceBundleLoaderInterface, LoggerAwareInterface
2829
{
2930
public function __construct(

0 commit comments

Comments
 (0)