Exceptions
Exception
Symfony\Component\Serializer\Exception\ NotEncodableValueException
in
vendor/symfony/serializer/Serializer.php
(line 130)
* {@inheritdoc}
*/
final public function serialize($data, string $format, array $context = []): string
{
if (!$this->supportsEncoding($format, $context)) {
throw new NotEncodableValueException(sprintf('Serialization for the format "%s" is not supported.', $format));
}
if ($this->encoder->needsNormalization($format, $context)) {
$data = $this->normalize($data, $format, $context);
}
in
vendor/api-platform/core/src/Symfony/EventListener/SerializeListener.php
->
serialize
(line 145)
* @throws RuntimeException
*/
private function serializeRawData(ViewEvent $event, Request $request, $controllerResult): void
{
if (\is_object($controllerResult)) {
$event->setControllerResult($this->serializer->serialize($controllerResult, $request->getRequestFormat(), $request->attributes->get('_api_normalization_context', [])));
return;
}
if (!$this->serializer instanceof EncoderInterface) {
in
vendor/api-platform/core/src/Symfony/EventListener/SerializeListener.php
->
serializeRawData
(line 97)
) {
return;
}
if (!$attributes) {
$this->serializeRawData($event, $request, $controllerResult);
return;
}
$context = $this->serializerContextBuilder->createFromRequest($request, true, $attributes);
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelView
(line 118)
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 230)
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 59)
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 154)
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 168)
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
if ($event->hasResponse()) {
$response = $event->getResponse();
} else {
$msg = sprintf('The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned %s.', $this->varToString($response));
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$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) |