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
This commit is contained in:
commit
66da1d23f5
@ -90,7 +90,7 @@ class FrameworkExtension extends Extension
|
||||
$this->registerFormConfiguration($config, $container, $loader);
|
||||
$config['validation']['enabled'] = true;
|
||||
|
||||
if (!class_exists('Symfony\Component\Validator\Validator')) {
|
||||
if (!class_exists('Symfony\Component\Validator\Validation')) {
|
||||
throw new LogicException('The Validator component is required to use the Form component.');
|
||||
}
|
||||
|
||||
@ -643,8 +643,8 @@ class FrameworkExtension extends Extension
|
||||
|
||||
// Discover translation directories
|
||||
$dirs = array();
|
||||
if (class_exists('Symfony\Component\Validator\Validator')) {
|
||||
$r = new \ReflectionClass('Symfony\Component\Validator\Validator');
|
||||
if (class_exists('Symfony\Component\Validator\Validation')) {
|
||||
$r = new \ReflectionClass('Symfony\Component\Validator\Validation');
|
||||
|
||||
$dirs[] = dirname($r->getFilename()).'/Resources/translations';
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ abstract class FrameworkExtensionTest extends TestCase
|
||||
}
|
||||
|
||||
$files = array_map(function ($resource) { return realpath($resource[1]); }, $resources);
|
||||
$ref = new \ReflectionClass('Symfony\Component\Validator\Validator');
|
||||
$ref = new \ReflectionClass('Symfony\Component\Validator\Validation');
|
||||
$this->assertContains(
|
||||
strtr(dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
|
||||
$files,
|
||||
@ -250,7 +250,7 @@ abstract class FrameworkExtensionTest extends TestCase
|
||||
$files,
|
||||
'->registerTranslatorConfiguration() finds Form translation resources'
|
||||
);
|
||||
$ref = new \ReflectionClass('Symfony\Component\Security\Core\SecurityContext');
|
||||
$ref = new \ReflectionClass('Symfony\Component\Security\Core\Security');
|
||||
$this->assertContains(
|
||||
strtr(dirname($ref->getFileName()).'/Resources/translations/security.en.xlf', '/', DIRECTORY_SEPARATOR),
|
||||
$files,
|
||||
|
Reference in New Issue
Block a user