You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADE-5.1.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,4 +164,20 @@ Security
164
164
Yaml
165
165
----
166
166
167
+
* Added support for parsing numbers prefixed with `0o` as octal numbers.
168
+
* Deprecated support for parsing numbers starting with `0` as octal numbers. They will be parsed as strings as of Symfony 6.0. Prefix numbers with `0o`
169
+
so that they are parsed as octal numbers.
170
+
171
+
Before:
172
+
173
+
```yaml
174
+
Yaml::parse('072');
175
+
```
176
+
177
+
After:
178
+
179
+
```yaml
180
+
Yaml::parse('0o72');
181
+
```
182
+
167
183
* Deprecated using the `!php/object` and `!php/const` tags without a value.
Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/CHANGELOG.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,22 @@ CHANGELOG
4
4
5.1.0
5
5
-----
6
6
7
+
* Added support for parsing numbers prefixed with `0o` as octal numbers.
8
+
* Deprecated support for parsing numbers starting with `0` as octal numbers. They will be parsed as strings as of Symfony 6.0. Prefix numbers with `0o`
9
+
so that they are parsed as octal numbers.
10
+
11
+
Before:
12
+
13
+
```yaml
14
+
Yaml::parse('072');
15
+
```
16
+
17
+
After:
18
+
19
+
```yaml
20
+
Yaml::parse('0o72');
21
+
```
22
+
7
23
* Added `yaml-lint` binary.
8
24
* Deprecated using the `!php/object` and `!php/const` tags without a value.
Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/Inline.php
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -631,6 +631,14 @@ private static function evaluateScalar(string $scalar, int $flags, array $refere
631
631
default:
632
632
thrownewParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename);
$this->expectDeprecation('Since symfony/yaml 5.1: Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0.');
0 commit comments