Skip to content

Commit a168d2d

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Serializer] Save missing arguments in MissingConstructorArgumentsException remove support for deprecated "threadKey" parameter Remove useless comment in test [DomCrawler] Added Crawler::innerText() method [Form] Add the EnumType Fix iterrator in ServiceConfigurator [Console] Add support of RGB functional notation for output colors Add Slovak lang translation #41081 [Validator] Add error's uid to `Count` and `Length` constraints with "exactly" option enabled [Validator] Add missing thai translation [Yaml] Add 0 to float repr [Translation] Add Burmese translation [Notifier] Update FirebaseTransport.php fix: #43086 remove shortcut e for option exclude of Yaml/LintCommand - solve conflict with --env -e Map `multipart/form-data` as `form` Content-Type [Serializer] Throw NotNormalizableValueException when type is not known or not in body in discriminator map [Yaml] Use more concise float representation in dump [FrameworkBundle] Remove translation data_collector BEFORE adding it to profiler
2 parents 53cc3bd + 251888d commit a168d2d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected function configure()
5858
->setDescription(self::$defaultDescription)
5959
->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')
6060
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format')
61-
->addOption('exclude', 'e', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude')
61+
->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude')
6262
->addOption('parse-tags', null, InputOption::VALUE_NEGATABLE, 'Parse custom tags', null)
6363
->setHelp(<<<EOF
6464
The <info>%command.name%</info> command lints a YAML file and outputs to STDOUT

Inline.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ public static function dump(mixed $value, int $flags = 0): string
158158
$repr = str_ireplace('INF', '.Inf', $repr);
159159
} elseif (floor($value) == $value && $repr == $value) {
160160
// Preserve float data type since storing a whole number will result in integer value.
161-
$repr = '!!float '.$repr;
161+
if (false === strpos($repr, 'E')) {
162+
$repr = $repr.'.0';
163+
}
162164
}
163165
} else {
164166
$repr = \is_string($value) ? "'$value'" : (string) $value;

Tests/InlineTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ public function getTestsForParse()
295295
['12_', 12],
296296
['"quoted string"', 'quoted string'],
297297
["'quoted string'", 'quoted string'],
298+
['1234.0', 1234.0],
298299
['12.30e+02', 12.30e+02],
299300
['123.45_67', 123.4567],
300301
['0x4D2', 0x4D2],
@@ -458,7 +459,8 @@ public function getTestsForDump()
458459
['_12', '_12'],
459460
["'12_'", '12_'],
460461
["'quoted string'", 'quoted string'],
461-
['!!float 1230', 12.30e+02],
462+
['1230.0', 12.30e+02],
463+
['1.23E+45', 12.30e+44],
462464
['1234', 0x4D2],
463465
['1243', 02333],
464466
["'0x_4_D_2_'", '0x_4_D_2_'],

0 commit comments

Comments
 (0)