Skip to content

Commit b9e5b3f

Browse files
committed
Merge branch '7.3' into 7.4
* 7.3: [Validator] Skip tests using unavailable timezone on the local host [Yaml] Fix scope resolution operator in flow mapping keys
2 parents 07273df + 854a592 commit b9e5b3f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ public function testGroupedTimezonesWithInvalidCountry()
258258
#[DataProvider('getDeprecatedTimezones')]
259259
public function testDeprecatedTimezonesAreValidWithBC(string $timezone)
260260
{
261+
// Skip test if the timezone is not available in the current timezone database
262+
if (!\in_array($timezone, \DateTimeZone::listIdentifiers(\DateTimeZone::ALL_WITH_BC), true)) {
263+
$this->markTestSkipped(sprintf('Timezone "%s" is not available in the current timezone database', $timezone));
264+
}
265+
261266
$constraint = new Timezone(\DateTimeZone::ALL_WITH_BC);
262267

263268
$this->validator->validate($timezone, $constraint);

src/Symfony/Component/Yaml/Inline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
459459
}
460460

461461
if ('!php/const' === $key || '!php/enum' === $key) {
462-
$key .= ' '.self::parseScalar($mapping, $flags, [':'], $i, false);
462+
$key .= ' '.self::parseScalar($mapping, $flags, ['(?<!:):(?!:)'], $i, false);
463463
$key = self::evaluateScalar($key, $flags);
464464
}
465465

src/Symfony/Component/Yaml/Tests/InlineTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public static function getTestsForParsePhpConstants()
5858
['{ foo: !php/const PHP_INT_MAX }', ['foo' => \PHP_INT_MAX]],
5959
['{ !php/const PHP_INT_MAX: foo }', [\PHP_INT_MAX => 'foo']],
6060
['!php/const NULL', null],
61+
['{ !php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT: foo }', [Yaml::PARSE_CONSTANT => 'foo']],
6162
];
6263
}
6364

0 commit comments

Comments
 (0)