Skip to content

Commit 66da1d2

Browse files
committed
minor #13335 [FrameworkBundle] avoid using deprecated classes for reflection (fabpot)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] avoid using deprecated classes for reflection | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 26fa1a5 [FrameworkBundle] avoid using deprecated classes for reflection
2 parents 2cdeae5 + 26fa1a5 commit 66da1d2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function load(array $configs, ContainerBuilder $container)
9090
$this->registerFormConfiguration($config, $container, $loader);
9191
$config['validation']['enabled'] = true;
9292

93-
if (!class_exists('Symfony\Component\Validator\Validator')) {
93+
if (!class_exists('Symfony\Component\Validator\Validation')) {
9494
throw new LogicException('The Validator component is required to use the Form component.');
9595
}
9696

@@ -643,8 +643,8 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
643643

644644
// Discover translation directories
645645
$dirs = array();
646-
if (class_exists('Symfony\Component\Validator\Validator')) {
647-
$r = new \ReflectionClass('Symfony\Component\Validator\Validator');
646+
if (class_exists('Symfony\Component\Validator\Validation')) {
647+
$r = new \ReflectionClass('Symfony\Component\Validator\Validation');
648648

649649
$dirs[] = dirname($r->getFilename()).'/Resources/translations';
650650
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function testTranslator()
238238
}
239239

240240
$files = array_map(function ($resource) { return realpath($resource[1]); }, $resources);
241-
$ref = new \ReflectionClass('Symfony\Component\Validator\Validator');
241+
$ref = new \ReflectionClass('Symfony\Component\Validator\Validation');
242242
$this->assertContains(
243243
strtr(dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
244244
$files,
@@ -250,7 +250,7 @@ public function testTranslator()
250250
$files,
251251
'->registerTranslatorConfiguration() finds Form translation resources'
252252
);
253-
$ref = new \ReflectionClass('Symfony\Component\Security\Core\SecurityContext');
253+
$ref = new \ReflectionClass('Symfony\Component\Security\Core\Security');
254254
$this->assertContains(
255255
strtr(dirname($ref->getFileName()).'/Resources/translations/security.en.xlf', '/', DIRECTORY_SEPARATOR),
256256
$files,

0 commit comments

Comments
 (0)