Skip to content

Commit 339ef20

Browse files
committed
Doc reproducer + example
1 parent 7ac04b5 commit 339ef20

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

src/LiveComponent/src/DependencyInjection/LiveComponentExtension.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@
5454
use Symfony\UX\TwigComponent\ComponentFactory;
5555
use Symfony\UX\TwigComponent\ComponentRenderer;
5656

57-
use function Symfony\Component\DependencyInjection\Loader\Configurator\tagged_iterator;
58-
5957
/**
6058
* @author Kevin Bond <[email protected]>
6159
*

src/LiveComponent/tests/Unit/DependencyInjection/LiveComponentConfigurationTest.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\UX\LiveComponent\Tests\Unit\DependencyInjection;
413

514
use PHPUnit\Framework\TestCase;
@@ -16,20 +25,20 @@ public function testDefaultSecret()
1625

1726
$this->assertEquals('%kernel.secret%', $config['secret']);
1827
}
19-
28+
2029
public function testEmptySecretThrows()
2130
{
2231
$this->expectException(InvalidConfigurationException::class);
2332
$this->expectExceptionMessage('The path "live_component.secret" cannot contain an empty value, but got null.');
24-
33+
2534
$processor = new Processor();
2635
$config = $processor->processConfiguration(new LiveComponentExtension(), [
2736
'live_component' => [
2837
'secret' => null,
2938
],
3039
]);
3140
}
32-
41+
3342
public function testCustomSecret()
3443
{
3544
$processor = new Processor();

src/LiveComponent/tests/Unit/DependencyInjection/LiveComponentExtensionTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\UX\LiveComponent\Tests\Unit\DependencyInjection;
413

514
use PHPUnit\Framework\TestCase;
@@ -32,7 +41,7 @@ public function testCustomSecretIsUsedInDefinition(): void
3241
$this->assertSame('custom_secret', $container->getDefinition('ux.live_component.component_hydrator')->getArgument(4));
3342
$this->assertSame('custom_secret', $container->getDefinition('ux.live_component.fingerprint_calculator')->getArgument(0));
3443
}
35-
44+
3645
private function createContainer(): ContainerBuilder
3746
{
3847
$container = new ContainerBuilder(new ParameterBag([

0 commit comments

Comments
 (0)