symfony/symfony · error · LogicException
RemoteEvent support cannot be enabled as the component is no
Error message
RemoteEvent support cannot be enabled as the component is not installed. Try running "composer require symfony/remote-event".
What it means
registerRemoteEventConfiguration() requires the RemoteEvent class from symfony/remote-event. Enabling remote-event integration (used by webhook/mailer/notifier bridges to normalize incoming provider events) without the package throws this compile-time LogicException.
Source
Thrown at src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php:3437
$controller->replaceArgument(0, $parsers);
$controller->replaceArgument(1, new Reference($config['message_bus']));
$jsonBodyConfigurator = $container->getDefinition('webhook.body_configurator.json');
$jsonBodyConfigurator->replaceArgument(0, new Reference($serializerEnabled ? 'webhook.payload_serializer.serializer' : 'webhook.payload_serializer.json'));
$container->getDefinition('webhook.headers_configurator')
->replaceArgument(0, $config['event_header_name'])
->replaceArgument(1, $config['id_header_name']);
$container->getDefinition('webhook.signer')
->replaceArgument(0, $config['signing_algorithm'])
->replaceArgument(1, $config['signature_header_name']);
}
private function registerRemoteEventConfiguration(PhpFileLoader $loader): void
{
if (!class_exists(RemoteEvent::class)) {
throw new LogicException('RemoteEvent support cannot be enabled as the component is not installed. Try running "composer require symfony/remote-event".');
}
$loader->load('remote_event.php');
}
private function registerRateLimiterConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader): void
{
$loader->load('rate_limiter.php');
$limiters = [];
$compoundLimiters = [];
foreach ($config['limiters'] as $name => $limiterConfig) {
if ('compound' === $limiterConfig['policy']) {
$compoundLimiters[$name] = $limiterConfig;
continue;
}View on GitHub (pinned to 698e28026c)
Solutions
- Run `composer require symfony/remote-event`, then clear cache.
- Remove the config that triggered the integration (e.g. the webhook/parser that requires remote events).
- Verify with `php -r 'echo class_exists("Symfony\\Component\\RemoteEvent\\RemoteEvent")?1:0;'`.
Example fix
# before
framework:
remote_event: ~
# (symfony/remote-event missing -> LogicException)
# after
# composer require symfony/remote-event Defensive patterns
Strategy: validation
Validate before calling
$isRemoteEventAvailable = class_exists(\Symfony\Component\RemoteEvent\RemoteEvent::class);
if (!$isRemoteEventAvailable) {
throw new \LogicException('Enable symfony/remote-event before wiring remote event integration.');
} Type guard
null
Try / catch
null
Prevention
- Install symfony/remote-event when adopting webhook/mailer/notifier bridges that emit RemoteEvent objects.
- Gate dependent config on `class_exists(RemoteEvent::class)`.
- CI cold-cache `cache:clear` to catch missing components.
When it happens
Trigger: Triggering remote-event wiring (e.g. configuring a webhook/mailer/notifier bridge that depends on it, or enabling the remote_event section) while symfony/remote-event is not installed.
Common situations: Adding an inbound webhook/parser bridge that emits RemoteEvent objects without the base package; recipe/config enabling remote_event with the component missing.
Related errors
- Scheduler support cannot be enabled as the Scheduler compone
- Messenger support cannot be enabled as the Messenger compone
- Rate limiter cannot be used within Messenger as the RateLimi
- Caching cannot be enabled as version 7.4+ of the HttpClient
- Mailer support cannot be enabled as the component is not ins
AI-assisted analysis of symfony/symfony@698e28026c (2026-08-06).
Data as JSON: /api/errors/b4810bd7b0c19a92.
Report an issue: GitHub.