Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle][DX] Display a nice error message if an enabled component is missing #25094

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ public function load(array $configs, ContainerBuilder $container)
}

if ($this->isConfigEnabled($container, $config['form'])) {
if (!class_exists('Symfony\Component\Form\Form')) {
throw new LogicException('Form support cannot be enabled as the Form component is not installed.');
}

$this->formConfigEnabled = true;
$this->registerFormConfiguration($config, $container, $loader);
$config['validation']['enabled'] = true;
Expand Down Expand Up @@ -216,6 +220,10 @@ public function load(array $configs, ContainerBuilder $container)
$this->registerPropertyAccessConfiguration($config['property_access'], $container, $loader);

if ($this->isConfigEnabled($container, $config['serializer'])) {
if (!class_exists('Symfony\Component\Serializer\Serializer')) {
throw new LogicException('Serializer support cannot be enabled as the Serializer component is not installed.');
}

$this->registerSerializerConfiguration($config['serializer'], $container, $loader);
}

Expand Down