[LiveComponent] Add the `live.component` service tag

by @jakubtobiasz

Some issues have been detected in this pull request

0
Coding Standard

0
Common Typos

0
JSON Files Syntax

0
File Permissions

0
Merge Commits

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/ux/1693/274dfb848cd81e7dbefc86727f900a6ef92b28cc/exception_messages.diff | patch -p0
diff -ru src/LiveComponent/src/DependencyInjection/Compiler/LiveComponentTagPass.php src/LiveComponent/src/DependencyInjection/Compiler/LiveComponentTagPass.php
--- src/LiveComponent/src/DependencyInjection/Compiler/LiveComponentTagPass.php	2024-04-27 16:10:48.215564572 +0000
+++ src/LiveComponent/src/DependencyInjection/Compiler/LiveComponentTagPass.php	2024-04-27 16:10:49.977626584 +0000
@@ -31,8 +31,8 @@
             foreach ($tags as $tag) {
                 $liveComponentService = $container->getDefinition($id);
                 $liveComponentService->addTag('twig.component', [
-                    'key' => $tag['key'] ?? throw new InvalidArgumentException('The "key" attribute is required for the "live.component" tag'),
-                    'template' => $tag['template'] ?? throw new InvalidArgumentException('The "template" attribute is required for the "live.component" tag'),
+                    'key' => $tag['key'] ?? throw new InvalidArgumentException('The "key" attribute is required for the "live.component" tag.'),
+                    'template' => $tag['template'] ?? throw new InvalidArgumentException('The "template" attribute is required for the "live.component" tag.'),
                     'expose_public_props' => $tag['expose_public_props'] ?? true,
                     'attributes_var' => $tag['attributes_var'] ?? 'attributes',
                     'default_action' => $tag['default_action'] ?? null,

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages