Forwarded to ErrorController (41e3f5)

Exceptions

Symfony\UX\Autocomplete\Form\WrappedEntityTypeAutocompleter::getLabel(): Return value must be of type string, null returned

Exception

TypeError

  1. if (null === $choiceLabel) {
  2. return (string) $entity;
  3. }
  4. if (\is_string($choiceLabel) || $choiceLabel instanceof PropertyPathInterface) {
  5. return $this->propertyAccessor->getValue($entity, $choiceLabel);
  6. }
  7. if ($choiceLabel instanceof ChoiceLabel) {
  8. $choiceLabel = $choiceLabel->getOption();
  9. }
  1. private function formatResult(EntityAutocompleterInterface $autocompleter, object $entity): array
  2. {
  3. return [
  4. ...$autocompleter->getAttributes($entity),
  5. 'value' => $autocompleter->getValue($entity),
  6. 'text' => $autocompleter->getLabel($entity),
  7. ];
  8. }
  9. }
  1. $results = [];
  2. if (null === $groupBy = $autocompleter->getGroupBy()) {
  3. foreach ($paginator as $entity) {
  4. $results[] = $this->formatResult($autocompleter, $entity);
  5. }
  6. return new AutocompleteResults($results, $hasNextPage);
  7. }
  1. if ($autocompleter instanceof AutocompleterInterface) {
  2. return $autocompleter->fetchResults($query, $page);
  3. }
  4. return $this->fetchEntityResults($autocompleter, $query, $page);
  5. }
  6. private function fetchEntityResults(EntityAutocompleterInterface $autocompleter, string $query, int $page): AutocompleteResults
  7. {
  8. if (null === $this->managerRegistry) {
  1. }
  2. $page = $request->query->getInt('page', 1);
  3. $nextPage = null;
  4. $data = $this->autocompleteResultsExecutor->fetchResults($autocompleter, $request->query->get('query', ''), $page);
  5. if ($data->hasNextPage) {
  6. $parameters = array_merge($request->attributes->all('_route_params'), $request->query->all(), ['page' => $page + 1]);
  7. $nextPage = $this->urlGenerator->generate($request->attributes->get('_route'), $parameters);
  1. $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
  2. $controller = $event->getController();
  3. $arguments = $event->getArguments();
  4. // call controller
  5. $response = $controller(...$arguments);
  6. // view
  7. if (!$response instanceof Response) {
  8. $event = new ViewEvent($this, $request, $type, $response, $event);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. $response->send(false);
  7. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
  8. fastcgi_finish_request();
in vendor/autoload_runtime.php -> run (line 32)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/sylius/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

Level Channel Message
INFO 13:41:43 deprecation User Deprecated: The Liip\ImagineBundle\Templating\FilterTrait trait is deprecated since version 2.7 and will be removed in 3.0; use Twig instead.
{
    "exception": {}
}
INFO 13:41:43 deprecation User Deprecated: The Liip\ImagineBundle\Templating\FilterExtension class is deprecated since version 2.7 and will be removed in 3.0; configure "liip_imagine.twig.mode" to "lazy" instead.
{
    "exception": {}
}
INFO 13:41:43 deprecation User Deprecated: Support for MySQL < 8 is deprecated and will be removed in DBAL 5 (AbstractMySQLDriver.php:80 called by AbstractDriverMiddleware.php:32, https://github.com/doctrine/dbal/pull/6343, package doctrine/dbal)
{
    "exception": {}
}
INFO 13:41:43 deprecation User Deprecated: Specifying the "nullable" attribute for join columns in many-to-many associations (here, Sylius\Component\Core\Model\PaymentMethod::$channels) is a no-op. The ORM will always set it to false. Doing so is deprecated and will be an error in 4.0. (ManyToManyOwningSideMapping.php:133 called by ClassMetadata.php:1449, https://github.com/doctrine/orm/pull/12126, package doctrine/orm)
{
    "exception": {}
}
INFO 13:41:43 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "e13842"
    },
    "request_uri": "http://webshop.scherstra.com/_profiler/e13842",
    "method": "GET"
}
DEBUG 13:41:43 security Checking for authenticator support.
{
    "firewall_name": "shop",
    "authenticators": 3
}
DEBUG 13:41:43 security Checking support on authenticator.
{
    "firewall_name": "shop",
    "authenticator": "Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator"
}
DEBUG 13:41:43 security Authenticator does not support the request.
{
    "firewall_name": "shop",
    "authenticator": "Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator"
}
DEBUG 13:41:43 security Checking support on authenticator.
{
    "firewall_name": "shop",
    "authenticator": "Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator"
}
DEBUG 13:41:43 security Authenticator does not support the request.
{
    "firewall_name": "shop",
    "authenticator": "Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator"
}
DEBUG 13:41:43 security Checking support on authenticator.
{
    "firewall_name": "shop",
    "authenticator": "Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator"
}
DEBUG 13:41:43 security Authenticator does not support the request.
{
    "firewall_name": "shop",
    "authenticator": "Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator"
}
INFO 13:41:43 doctrine Connecting with parameters {params}
{
    "params": {
        "driver": "pdo_mysql",
        "idle_connection_ttl": 600,
        "host": "127.0.0.1",
        "port": 3306,
        "user": "geoff",
        "password": "<redacted>",
        "driverOptions": [],
        "defaultTableOptions": [],
        "dbname": "sylius_demo",
        "serverVersion": "8.0",
        "charset": "utf8mb4"
    }
}
DEBUG 13:41:43 doctrine Executing statement: SELECT t0.code AS code_1, t0.name AS name_2, t0.color AS color_3, t0.description AS description_4, t0.enabled AS enabled_5, t0.hostname AS hostname_6, t0.created_at AS created_at_7, t0.updated_at AS updated_at_8, t0.id AS id_9, t0.theme_name AS theme_name_10, t0.tax_calculation_strategy AS tax_calculation_strategy_11, t0.contact_email AS contact_email_12, t0.contact_phone_number AS contact_phone_number_13, t0.skipping_shipping_step_allowed AS skipping_shipping_step_allowed_14, t0.skipping_payment_step_allowed AS skipping_payment_step_allowed_15, t0.account_verification_required AS account_verification_required_16, t0.shipping_address_in_checkout_required AS shipping_address_in_checkout_required_17, t0.default_locale_id AS default_locale_id_18, t19.code AS code_20, t19.created_at AS created_at_21, t19.updated_at AS updated_at_22, t19.id AS id_23, t0.base_currency_id AS base_currency_id_24, t25.code AS code_26, t25.created_at AS created_at_27, t25.updated_at AS updated_at_28, t25.id AS id_29, t0.default_tax_zone_id AS default_tax_zone_id_30, t0.menu_taxon_id AS menu_taxon_id_31, t0.shop_billing_data_id AS shop_billing_data_id_32, t0.channel_price_history_config_id AS channel_price_history_config_id_33 FROM sylius_channel t0 INNER JOIN sylius_locale t19 ON t0.default_locale_id = t19.id INNER JOIN sylius_currency t25 ON t0.base_currency_id = t25.id WHERE t0.hostname = ? AND t0.enabled = ? ORDER BY t0.id ASC LIMIT 1 (parameters: {params}, types: {types})

                            
DEBUG 13:41:43 doctrine Executing query: SELECT COUNT(*) FROM sylius_channel t0
{
    "sql": "SELECT COUNT(*) FROM sylius_channel t0"
}
INFO 13:41:43 deprecation User Deprecated: Since sylius/mollie-plugin 2.2: Not passing an instance of "Sylius\Component\Payment\Resolver\PaymentMethodsResolverInterface" is deprecated and will be required in MolliePlugin 4.0
{
    "exception": {}
}

Stack Trace

TypeError
TypeError:
Symfony\UX\Autocomplete\Form\WrappedEntityTypeAutocompleter::getLabel(): Return value must be of type string, null returned

  at vendor/symfony/ux-autocomplete/src/Form/WrappedEntityTypeAutocompleter.php:92
  at Symfony\UX\Autocomplete\Form\WrappedEntityTypeAutocompleter->getLabel()
     (vendor/symfony/ux-autocomplete/src/AutocompleteResultsExecutor.php:158)
  at Symfony\UX\Autocomplete\AutocompleteResultsExecutor->formatResult()
     (vendor/symfony/ux-autocomplete/src/AutocompleteResultsExecutor.php:80)
  at Symfony\UX\Autocomplete\AutocompleteResultsExecutor->fetchEntityResults()
     (vendor/symfony/ux-autocomplete/src/AutocompleteResultsExecutor.php:48)
  at Symfony\UX\Autocomplete\AutocompleteResultsExecutor->fetchResults()
     (vendor/symfony/ux-autocomplete/src/Controller/AutocompleteController.php:57)
  at Symfony\UX\Autocomplete\Controller\AutocompleteController->__invoke()
     (vendor/symfony/http-kernel/HttpKernel.php:185)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:195)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:34)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:32)
  at require_once('/var/www/sylius/vendor/autoload_runtime.php')
     (public/index.php:5)