Skip to content

Could not load type "phone_number" #148

Open
@diriy

Description

@diriy

I use Symfony 3.2 and the latest version of EasyAdminBundle. But when I tried to add the phoneNumber field, I got the following error: "Could not load type "phone_number"" which was caused in file vendor\symfony\symfony\src\Symfony\Component\Form\FormRegistry.php line 87
I send the code from this file. How can I solve this issue?

/** * {@inheritdoc} */ public function getType($name) { if (!isset($this->types[$name])) { $type = null; foreach ($this->extensions as $extension) { if ($extension->hasType($name)) { $type = $extension->getType($name); break; } } if (!$type) { // Support fully-qualified class names if (class_exists($name) && in_array('Symfony\Component\Form\FormTypeInterface', class_implements($name))) { $type = new $name(); } else { throw new InvalidArgumentException(sprintf('Could not load type "%s"', $name)); } } $this->types[$name] = $this->resolveType($type); } return $this->types[$name]; }

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