Skip to content

Commit d39b4ca

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: chown and chgrp should also accept int as owner and group Fix RememberMe with null password [Validator] Fix plurals for sr_Latn (Serbian language written in latin script) validation messages [PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code fix PHP const mapping keys using the inline notation Fix that no-cache requires positive validation with the origin, even for fresh responses
2 parents b7883aa + 5e3a474 commit d39b4ca

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Inline.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,11 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
439439
throw new ParseException('Missing mapping key.', self::$parsedLineNumber + 1, $mapping);
440440
}
441441

442+
if ('!php/const' === $key) {
443+
$key .= ' '.self::parseScalar($mapping, $flags, [':'], $i, false, []);
444+
$key = self::evaluateScalar($key, $flags);
445+
}
446+
442447
if (false === $i = strpos($mapping, ':', $i)) {
443448
break;
444449
}

Tests/InlineTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function getTestsForParsePhpConstants()
5959
['!php/const PHP_INT_MAX', PHP_INT_MAX],
6060
['[!php/const PHP_INT_MAX]', [PHP_INT_MAX]],
6161
['{ foo: !php/const PHP_INT_MAX }', ['foo' => PHP_INT_MAX]],
62+
['{ !php/const PHP_INT_MAX: foo }', [PHP_INT_MAX => 'foo']],
6263
['!php/const NULL', null],
6364
];
6465
}

0 commit comments

Comments
 (0)