Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e726337

Browse files
committed
minor #23387 [Yaml] Remove !str tag support (maidmaid)
This PR was merged into the 4.0-dev branch. Discussion ---------- [Yaml] Remove !str tag support | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | / | License | MIT | Doc PR | / In 4.0, support for the ``!str`` tag is removed. Commits ------- 9011aa1 Remove !str support
2 parents 7f52292 + 9011aa1 commit e726337

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

src/Symfony/Component/Yaml/Inline.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,6 @@ private static function evaluateScalar($scalar, $flags, $references = array())
550550
return false;
551551
case $scalar[0] === '!':
552552
switch (true) {
553-
case 0 === strpos($scalar, '!str'):
554-
@trigger_error('Support for the !str tag is deprecated since version 3.4. Use the !!str tag instead.', E_USER_DEPRECATED);
555-
556-
return (string) substr($scalar, 5);
557553
case 0 === strpos($scalar, '!!str '):
558554
return (string) substr($scalar, 6);
559555
case 0 === strpos($scalar, '! '):

src/Symfony/Component/Yaml/Tests/InlineTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -703,13 +703,4 @@ public function getNotPhpCompatibleMappingKeyData()
703703
'float' => array('{0.25: "foo"}', array('0.25' => 'foo')),
704704
);
705705
}
706-
707-
/**
708-
* @group legacy
709-
* @expectedDeprecation Support for the !str tag is deprecated since version 3.4. Use the !!str tag instead.
710-
*/
711-
public function testDeprecatedStrTag()
712-
{
713-
$this->assertSame(array('foo' => 'bar'), Inline::parse('{ foo: !str bar }'));
714-
}
715706
}

0 commit comments

Comments
 (0)