Merge branch 'main' into develop
testing/ogcore-api/pipeline/head This commit looks good Details

pull/26/head
Manuel Aranda Rosales 2025-03-13 14:38:33 +01:00
commit 88ffad3841
2 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,9 @@
# Changelog
## [0.9.2] - 2025-03-12
### Fixed
- Added mercure service in docker compose file for deployments.
## [0.9.1] - 2025-03-12
### 🐛 Fixed
- Corrección en la cancelacion de transmisiones p2p.
@ -54,4 +59,4 @@
- **Added**: Secciones con nuevas características.
- **Fixed**: Corrección de errores y bugs.
- **Changed**: Modificaciones o mejoras en funcionalidades existentes.
- **Removed**: Funcionalidades o dependencias eliminadas.
- **Removed**: Funcionalidades o dependencias eliminadas.

View File

@ -10,6 +10,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Mercure\HubInterface;
use Symfony\Component\Mercure\Update;
@ -19,7 +20,8 @@ class MercureSubscriber implements EventSubscriberInterface
public function __construct(
LoggerInterface $logger,
private readonly HubInterface $hub
private readonly HubInterface $hub,
private readonly KernelInterface $kernel
)
{
$this->logger = $logger;
@ -34,6 +36,10 @@ class MercureSubscriber implements EventSubscriberInterface
public function onKernelView(ViewEvent $event): void
{
if ('test' === $this->kernel->getEnvironment()) {
return;
}
$request = $event->getRequest();
$method = $request->getMethod();