10000 FormField::addPanel() generate user notice on Symfony 6.2+ · Issue #5624 · EasyCorp/EasyAdminBundle · GitHub
[go: up one dir, main page]

Skip to content
FormField::addPanel() generate user notice on Symfony 6.2+ #5624
@Tanariel

Description

@Tanariel

Adding a FormField::addPanel() generate a user notice on Symfony 6.2.x when the option enable_lazy_ghost_objects: true is present inside the doctrine.yaml config.

Notice is thrown here when trying to access a property on the entity that obviously doesn't exist.

in src/Field/Configurator/CommonPreConfigurator.php

try {
                $value = null === $entityDto->getInstance() ? null : $this->propertyAccessor->getValue($entityDto->getInstance(), $field->getProperty());
            } catch (AccessException|UnexpectedTypeException) {
                $isReadable = false;
            }

Related issue in symfony :

symfony/symfony#48970

Putting the option то : option enable_lazy_ghost_objects: false solve the issue.

Capture d’écran 2023-02-10 à 13 14 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0