Skip to content

Commit 5cefd3f

Browse files
committed
minor #22913 [Yaml] Deprecate tags using colon (GuilhemN)
This PR was squashed before being merged into the 3.4 branch (closes #22913). Discussion ---------- [Yaml] Deprecate tags using colon | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Using a colon in a tag doesn't look like yaml and causes trouble (see symfony/symfony#22878), so I propose to just deprecate these tags in favor of more consistent tags. ```yml - !php/const:PHP_INT_MAX - !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";} ``` would become ```yml - !php/const PHP_INT_MAX - !php/object O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";} ``` Commits ------- 9815af3 [Yaml] Deprecate tags using colon
2 parents 4ffedbf + fd8960d commit 5cefd3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Tests/Mapping/Loader/mapping-with-constants.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Symfony\Component\Validator\Tests\Fixtures\Entity:
55
properties:
66
firstName:
77
- Range:
8-
max: !php/const:PHP_INT_MAX
8+
max: !php/const PHP_INT_MAX

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"symfony/http-kernel": "^3.3.5|~4.0",
2626
"symfony/var-dumper": "~3.3|~4.0",
2727
"symfony/intl": "^2.8.18|^3.2.5|~4.0",
28-
"symfony/yaml": "~3.3|~4.0",
28+
"symfony/yaml": "~3.4|~4.0",
2929
"symfony/config": "~2.8|~3.0|~4.0",
3030
"symfony/dependency-injection": "~3.3|~4.0",
3131
"symfony/expression-language": "~2.8|~3.0|~4.0",
@@ -39,7 +39,7 @@
3939
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
4040
"symfony/dependency-injection": "<3.3",
4141
"symfony/http-kernel": "<3.3.5",
42-
"symfony/yaml": "<3.3"
42+
"symfony/yaml": "<3.4"
4343
},
4444
"suggest": {
4545
"psr/cache-implementation": "For using the metadata cache.",

0 commit comments

Comments
 (0)