http://api.admin.dev.artenix.com/

Exceptions

Serialization for the format "html" is not supported.

Exception

Symfony\Component\Serializer\Exception\ NotEncodableValueException

  1.      * {@inheritdoc}
  2.      */
  3.     final public function serialize($datastring $format, array $context = []): string
  4.     {
  5.         if (!$this->supportsEncoding($format$context)) {
  6.             throw new NotEncodableValueException(sprintf('Serialization for the format "%s" is not supported.'$format));
  7.         }
  8.         if ($this->encoder->needsNormalization($format$context)) {
  9.             $data $this->normalize($data$format$context);
  10.         }
  1.      * @throws RuntimeException
  2.      */
  3.     private function serializeRawData(ViewEvent $eventRequest $request$controllerResult): void
  4.     {
  5.         if (\is_object($controllerResult)) {
  6.             $event->setControllerResult($this->serializer->serialize($controllerResult$request->getRequestFormat(), $request->attributes->get('_api_normalization_context', [])));
  7.             return;
  8.         }
  9.         if (!$this->serializer instanceof EncoderInterface) {
  1.         ) {
  2.             return;
  3.         }
  4.         if (!$attributes) {
  5.             $this->serializeRawData($event$request$controllerResult);
  6.             return;
  7.         }
  8.         $context $this->serializerContextBuilder->createFromRequest($requesttrue$attributes);
  1.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.         $response $controller(...$arguments);
  2.         // view
  3.         if (!$response instanceof Response) {
  4.             $event = new ViewEvent($this$request$type$response);
  5.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  6.             if ($event->hasResponse()) {
  7.                 $response $event->getResponse();
  8.             } else {
  9.                 $msg sprintf('The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned %s.'$this->varToString($response));
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in public/index.php (line 28)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Logs

Level Channel Message
INFO 15:58:36 php User Deprecated: Since api-platform/core 2.7: The $exceptionOnNoToken parameter in "ApiPlatform\Symfony\Security\ResourceAccessChecker::__construct()" is deprecated and will always be false in 3.0, you should stop using it.
{
    "exception": {}
}
INFO 15:58:36 php User Deprecated: Since api-platform/core 2.7: Using "api_platform.iri_converter.legacy" is deprecated since API Platform 2.7. Use "ApiPlatform\Api\IriConverterInterface" instead.
{
    "exception": {}
}
INFO 15:58:36 php User Deprecated: Since api-platform/core 2.7: The DataTransformer pattern is deprecated, use a Provider or a Processor and either use your input or return a new output there.
{
    "exception": {}
}
INFO 15:58:36 php User Deprecated: Allowing plain identifiers as argument of "ApiPlatform\Serializer\AbstractItemNormalizer" is deprecated since API Platform 2.7 and will not be possible anymore in API Platform 3.
{
    "exception": {}
}
INFO 15:58:36 php User Deprecated: Since api-platform/core 2.7: The DataTransformer pattern is deprecated, use a Provider or a Processor and either use your input or return a new output there.
{
    "exception": {}
}
INFO 15:58:36 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "latest"
    },
    "request_uri": "http://api.dev.artenix.com/_profiler/latest",
    "method": "GET"
}
INFO 15:58:36 php Deprecated: Calling static trait method Symfony\Component\Cache\Traits\RedisTrait::createConnection is deprecated, it should only be called on a class using the trait
{
    "exception": {}
}
INFO 15:58:36 php Deprecated: Accessing static trait property Symfony\Component\Cache\Traits\RedisTrait::$defaultConnectionOptions is deprecated, it should only be accessed on a class using the trait
{
    "exception": {}
}

Stack Trace

NotEncodableValueException
Symfony\Component\Serializer\Exception\NotEncodableValueException:
Serialization for the format "html" is not supported.

  at vendor/symfony/serializer/Serializer.php:130
  at Symfony\Component\Serializer\Serializer->serialize(object(Entrypoint), 'html', array())
     (vendor/api-platform/core/src/Symfony/EventListener/SerializeListener.php:145)
  at ApiPlatform\Symfony\EventListener\SerializeListener->serializeRawData(object(ViewEvent), object(Request), object(Entrypoint))
     (vendor/api-platform/core/src/Symfony/EventListener/SerializeListener.php:97)
  at ApiPlatform\Symfony\EventListener\SerializeListener->onKernelView(object(ViewEvent), 'kernel.view', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ViewEvent), 'kernel.view', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.view', object(ViewEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ViewEvent), 'kernel.view')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ViewEvent), 'kernel.view')
     (vendor/symfony/http-kernel/HttpKernel.php:168)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:28)