Skip to content

Commit 6c8c544

Browse files
weaverryansmnandre
authored andcommitted
Starting config
[TwigComponent] Adding new "defaults" namespace config to control auto name+template config Allowing config to just be a template dir... and with trailing slash [TwigComponent] Updating & reorganizing Twig component docs cs Adding Configuration docs Adding missing types Rebase Fix ComponentDebugCommand failing tests Configure anonymous template directory CS WIP Rework ComponentDebugCommand to handle component namespaces PR requested changes Remove comments Remove comments Fix LiveComponent test Kernel config Fix TwigComponentExtensionTest.php test Kernel config Update documentation
1 parent d244c0c commit 6c8c544

File tree

21 files changed

+1555
-638
lines changed

21 files changed

+1555
-638
lines changed

src/LiveComponent/tests/Fixtures/Kernel.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ protected function configureContainer(ContainerConfigurator $c): void
114114
'default_path' => '%kernel.project_dir%/tests/Fixtures/templates',
115115
]);
116116

117+
$c->extension('twig_component', [
118+
'defaults' => [
119+
'Symfony\UX\LiveComponent\Tests\Fixtures\Component\\' => 'components/',
120+
],
121+
'anonymous_template_directory' => 'components/',
122+
]);
123+
117124
$c->extension('zenstruck_foundry', [
118125
'auto_refresh_proxies' => false,
119126
]);

src/StimulusBundle/src/DependencyInjection/StimulusExtension.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ public function load(array $configs, ContainerBuilder $container): void
3232
$loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__.'/../../config'));
3333
$loader->load('services.php');
3434

35-
$configuration = $this->getConfiguration($configs, $container);
36-
$config = $this->processConfiguration($configuration, $configs);
35+
$config = $this->processConfiguration($this, $configs);
3736

3837
$container->findDefinition('stimulus.asset_mapper.controllers_map_generator')
3938
->replaceArgument(2, $config['controller_paths'])
@@ -64,11 +63,6 @@ public function prepend(ContainerBuilder $container)
6463
]);
6564
}
6665

67-
public function getConfiguration(array $config, ContainerBuilder $container): ConfigurationInterface
68-
{
69-
return $this;
70-
}
71-
7266
public function getConfigTreeBuilder(): TreeBuilder
7367
{
7468
$treeBuilder = new TreeBuilder('stimulus');

src/TwigComponent/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## 2.13.0
44

5+
- Deprecate calling `ComponentTemplateFinder` constructor without `directory` argument.
56
- Add profiler integration: `TwigComponentDataCollector` and debug toolbar templates
7+
- Add search feature in `debug:twig-component` command.
68

79
## 2.12.0
810

0 commit comments

Comments
 (0)