Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load type "phone_number" #148

Open
diriy opened this issue Sep 23, 2017 · 0 comments
Open

Could not load type "phone_number" #148

diriy opened this issue Sep 23, 2017 · 0 comments

Comments

@diriy
Copy link

diriy commented Sep 23, 2017

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]; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant