Skip to content

Commit d427bc0

Browse files
GuilhemNxabbuh
authored andcommitted
[Yaml] Deprecate tags using colon
1 parent 2d1443b commit d427bc0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Tests/Encoder/YamlEncoderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public function testContext()
6161
$obj = new \stdClass();
6262
$obj->bar = 2;
6363

64-
$this->assertEquals(" foo: !php/object:O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}\n", $encoder->encode(array('foo' => $obj), 'yaml'));
64+
$this->assertEquals(" foo: !php/object 'O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}'\n", $encoder->encode(array('foo' => $obj), 'yaml'));
6565
$this->assertEquals(' { foo: null }', $encoder->encode(array('foo' => $obj), 'yaml', array('yaml_inline' => 0, 'yaml_indent' => 2, 'yaml_flags' => 0)));
66-
$this->assertEquals(array('foo' => $obj), $encoder->decode('foo: !php/object:O:8:"stdClass":1:{s:3:"bar";i:2;}', 'yaml'));
67-
$this->assertEquals(array('foo' => null), $encoder->decode('foo: !php/object:O:8:"stdClass":1:{s:3:"bar";i:2;}', 'yaml', array('yaml_flags' => 0)));
66+
$this->assertEquals(array('foo' => $obj), $encoder->decode("foo: !php/object 'O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}'", 'yaml'));
67+
$this->assertEquals(array('foo' => null), $encoder->decode("foo: !php/object 'O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}'", 'yaml', array('yaml_flags' => 0)));
6868
}
6969
}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=5.5.9"
2020
},
2121
"require-dev": {
22-
"symfony/yaml": "~3.3|~4.0",
22+
"symfony/yaml": "~3.4|~4.0",
2323
"symfony/config": "~2.8|~3.0|~4.0",
2424
"symfony/property-access": "~2.8|~3.0|~4.0",
2525
"symfony/http-foundation": "~2.8|~3.0|~4.0",
@@ -34,7 +34,7 @@
3434
"symfony/dependency-injection": "<3.2",
3535
"symfony/property-access": ">=3.0,<3.0.4|>=2.8,<2.8.4",
3636
"symfony/property-info": "<3.1",
37-
"symfony/yaml": "<3.3"
37+
"symfony/yaml": "<3.4"
3838
},
3939
"suggest": {
4040
"psr/cache-implementation": "For using the metadata cache.",

0 commit comments

Comments
 (0)