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

Skip to content

Commit 48aa3e1

Browse files
Merge branch '2.7' into 2.8
* 2.7: [Locale] Add missing @group legacy annotations Fix security-acl deps Fix doctrine mapping validation type error Remove skipping of tests based on ICU data version whenever possible Fix the handling of null as locale in the stub intl classes do not dump leading backslashes in class names fix issue #15377 Skip ::class constant [Config] type specific check for emptiness Conflicts: src/Symfony/Bridge/Twig/composer.json src/Symfony/Bundle/SecurityBundle/composer.json src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
2 parents 9fdf314 + 07fb308 commit 48aa3e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+444
-140
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ protected function assertValidMappingConfiguration(array $mappingConfig, $object
252252
throw new \InvalidArgumentException(sprintf('Can only configure "xml", "yml", "annotation", "php" or '.
253253
'"staticphp" through the DoctrineBundle. Use your own bundle to configure other metadata drivers. '.
254254
'You can register them by adding a new driver to the '.
255-
'"%s" service definition.', $this->getObjectManagerElementName($objectManagerName.'.metadata_driver')
255+
'"%s" service definition.', $this->getObjectManagerElementName($objectManagerName.'_metadata_driver')
256256
));
257257
}
258258
}

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"symfony/translation": "~2.7|~3.0.0",
3232
"symfony/yaml": "~2.0,>=2.0.5|~3.0.0",
3333
"symfony/security": "~2.6|~3.0.0",
34+
"symfony/security-acl": "~2.6|~3.0.0",
3435
"symfony/stopwatch": "~2.2|~3.0.0",
3536
"symfony/console": "~2.7|~3.0.0",
3637
"symfony/var-dumper": "~2.6|~3.0.0",

src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function collect(Request $request, Response $response, \Exception $except
7171
if (null !== $this->roleHierarchy) {
7272
$allRoles = $this->roleHierarchy->getReachableRoles($assignedRoles);
7373
foreach ($allRoles as $role) {
74-
if (!in_array($role, $assignedRoles)) {
74+
if (!in_array($role, $assignedRoles, true)) {
7575
$inheritedRoles[] = $role;
7676
}
7777
}

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"require": {
1919
"php": ">=5.3.9",
2020
"symfony/security": "~2.8|~3.0.0",
21-
"symfony/http-kernel": "~2.2|~3.0.0",
22-
"symfony/security-acl": "~2.8|~3.0.0"
21+
"symfony/security-acl": "~2.8|~3.0.0",
22+
"symfony/http-kernel": "~2.2|~3.0.0"
2323
},
2424
"require-dev": {
2525
"symfony/phpunit-bridge": "~2.7|~3.0.0",

src/Symfony/Component/ClassLoader/ClassMapGenerator.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,25 @@ private static function findClasses($path)
118118
case T_CLASS:
119119
case T_INTERFACE:
120120
case SYMFONY_TRAIT:
121+
// Skip usage of ::class constant
122+
$isClassConstant = false;
123+
for ($j = $i - 1; $j > 0; --$j) {
124+
if (is_string($tokens[$j])) {
125+
break;
126+
}
127+
128+
if (T_DOUBLE_COLON === $tokens[$j][0]) {
129+
$isClassConstant = true;
130+
break;
131+
} elseif (!in_array($tokens[$j][0], array(T_WHITESPACE, T_DOC_COMMENT, T_COMMENT))) {
132+
break;
133+
}
134+
}
135+
136+
if ($isClassConstant) {
137+
continue;
138+
}
139+
121140
// Find the classname
122141
while (($t = $tokens[++$i]) && is_array($t)) {
123142
if (T_STRING === $t[0]) {

src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private function clean($file)
4747
/**
4848
* @dataProvider getTestCreateMapTests
4949
*/
50-
public function testDump($directory, $expected)
50+
public function testDump($directory)
5151
{
5252
$this->prepare_workspace();
5353

@@ -115,6 +115,12 @@ public function getTestCreateMapTests()
115115
));
116116
}
117117

118+
if (PHP_VERSION_ID >= 50500) {
119+
$data[] = array(__DIR__.'/Fixtures/php5.5', array(
120+
'ClassCons\\Foo' => __DIR__.'/Fixtures/php5.5/class_cons.php',
121+
));
122+
}
123+
118124
return $data;
119125
}
120126

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace ClassCons;
4+
5+
class Foo
6+
{
7+
public function __construct()
8+
{
9+
\Foo\TBar/* foo */::class;
10+
}
11+
}

src/Symfony/Component/Config/Definition/BooleanNode.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,13 @@ protected function validateType($value)
3939
throw $ex;
4040
}
4141
}
42+
43+
/**
44+
* {@inheritdoc}
45+
*/
46+
protected function isValueEmpty($value)
47+
{
48+
// a boolean value cannot be empty
49+
return false;
50+
}
4251
}

src/Symfony/Component/Config/Definition/NumericNode.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,13 @@ protected function finalizeValue($value)
5252

5353
return $value;
5454
}
55+
56+
/**
57+
* {@inheritdoc}
58+
*/
59+
protected function isValueEmpty($value)
60+
{
61+
// a numeric value cannot be empty
62+
return false;
63+
}
5564
}

src/Symfony/Component/Config/Definition/ScalarNode.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,12 @@ protected function validateType($value)
4646
throw $ex;
4747
}
4848
}
49+
50+
/**
51+
* {@inheritdoc}
52+
*/
53+
protected function isValueEmpty($value)
54+
{
55+
return null === $value || '' === $value;
56+
}
4957
}

0 commit comments

Comments
 (0)