8000 minor #22913 [Yaml] Deprecate tags using colon (GuilhemN) · symfony/yaml@1395ddb · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","url":"/symfony/yaml/commit/1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","authoredDate":"2017-08-04T15:29:48.000+02:00","committedDate":"2017-08-04T15:29:48.000+02:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eminor #22913 [Yaml] Deprecate tags using colon (GuilhemN)\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"This PR was squashed before being merged into the 3.4 branch (closes #22913).\n\nDiscussion\n----------\n\n[Yaml] Deprecate tags using colon\n\n| Q | A\n| ------------- | ---\n| Branch? | 3.4\n| Bug fix? | no\n| New feature? | no \u0026lt;!-- don't forget updating src/**/CHANGELOG.md files --\u0026gt;\n| BC breaks? | no\n| Deprecations? | yes\n| Tests pass? | yes\n| Fixed tickets |\n| License | MIT\n| Doc PR |\n\nUsing a colon in a tag doesn't look like yaml and causes trouble (see \u003ca class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"230849721\" data-permission-text=\"Title is private\" data-url=\"https://github.com/symfony/symfony/issues/22878\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"/symfony/symfony/pull/22878/hovercard\" href=\"https://github.com/symfony/symfony/pull/22878\"\u003esymfony/symfony#22878\u003c/a\u003e), so I propose to just deprecate these tags in favor of more consistent tags.\n\n```yml\n- !php/const:PHP_INT_MAX\n- !php/object:O:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}\n```\nwould become\n```yml\n- !php/const PHP_INT_MAX\n- !php/object O:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}\n```\n\nCommits\n-------\n\n9815af3 [Yaml] Deprecate tags using colon","authors":[{"login":"xabbuh","displayName":"Christian Flothmann","avatarUrl":"https://avatars.githubusercontent.com/u/1957048?v=4","path":"/xabbuh","isGitHub":false}],"committerAttribution":false,"committer":{"login":"xabbuh","displayName":"Christian Flothmann","avatarUrl":"https://avatars.githubusercontent.com/u/1957048?v=4","path":"/xabbuh","isGitHub":false},"parents":["99f52b149bfb50ed118162305ffa4e9765cc025f","38d3087a11b31cb149ac44d8446c4b0dbaedd2be"],"globalRelayId":"MDY6Q29tbWl0MTM4MTk4MzoxMzk1ZGRiYTZmNjViZjQ2Y2RmMWQ4MGQ1OTIyM2NiYWI4ZmYzY2Nj","sha1":"99f52b149bfb50ed118162305ffa4e9765cc025f","sha2":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc"},"currentUser":null,"repo":{"id":1381983,"defaultBranch":"7.3","name":"yaml","ownerLogin":"symfony","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2011-02-18T10:47:20.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/143937?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":3,"text":"@@ -4,6 +4,12 @@ CHANGELOG","html":"@@ -4,6 +4,12 @@ CHANGELOG","displayNoNewLineWarning":false,"position":0,"left":3,"right":3},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":4,"text":" 3.4.0","html":" 3.4.0","displayNoNewLineWarning":false,"position":1,"left":4,"right":4},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":5,"text":" -----","html":" \u003cspan class=\"pl-ms\"\u003e-----\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":5,"right":5},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":6,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":6,"right":6},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":7,"text":"+ * Deprecated the `!php/object:` tag which will be replaced by the","html":"+ \u003cspan class=\"pl-v\"\u003e*\u003c/span\u003e Deprecated the \u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e!php/object:\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e tag which will be replaced by the","displayNoNewLineWarning":false,"position":4,"left":6,"right":7},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":8,"text":"+ `!php/object` tag (without the colon) in 4.0.","html":"+ \u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e!php/object\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e tag (without the colon) in 4.0.","displayNoNewLineWarning":false,"position":5,"left":6,"right":8},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":9,"text":"+","html":"+","displayNoNewLineWarning":false,"position":6,"left":6,"right":9},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":10,"text":"+ * Deprecated the `!php/const:` tag which will be replaced by the","html":"+ \u003cspan class=\"pl-v\"\u003e*\u003c/span\u003e Deprecated the \u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e!php/const:\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e tag which will be replaced by the","displayNoNewLineWarning":false,"position":7,"left":6,"right":10},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":11,"text":"+ `!php/const` tag (without the colon) in 4.0.","html":"+ \u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e!php/const\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e tag (without the colon) in 4.0.","displayNoNewLineWarning":false,"position":8,"left":6,"right":11},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":12,"text":"+","html":"+","displayNoNewLineWarning":false,"position":9,"left":6,"right":12},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":13,"text":" * Support for the `!str` tag is deprecated, use the `!!str` tag instead.","html":" \u003cspan class=\"pl-v\"\u003e*\u003c/span\u003e Support for the \u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e!str\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e tag is deprecated, use the \u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e!!str\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e tag instead.","displayNoNewLineWarning":false,"position":10,"left":7,"right":13},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":14,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":11,"left":8,"right":14},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":15,"text":" * Deprecated using the non-specific tag `!` as its behavior will change in 4.0.","html":" \u003cspan class=\"pl-v\"\u003e*\u003c/span\u003e Deprecated using the non-specific tag \u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e!\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e`\u003c/span\u003e as its behavior will change in 4.0.","displayNoNewLineWarning":false,"position":12,"left":9,"right":15}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":145,"linesChanged":6,"newTreeEntry":{"lineCount":145,"path":"CHANGELOG.md","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"CHANGELOG.md","mode":100644},"linesAdded":6,"linesDeleted":0,"path":"CHANGELOG.md","pathDigest":"06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed","status":"MODIFIED","truncatedReason":null,"oldOid":"99f52b149bfb50ed118162305ffa4e9765cc025f","newOid":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","copilotChatReference":null,"deletedSha":"99f52b149bfb50ed118162305ffa4e9765cc025f","canToggleRichDiff":true,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":169,"text":"@@ -170,7 +170,7 @@ public static function dump($value, $flags = 0)","html":"@@ -170,7 +170,7 @@ public static function dump($value, $flags = 0)","displayNoNewLineWarning":false,"position":0,"left":169,"right":169},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":170,"text":" }","html":" }","displayNoNewLineWarning":false,"position":1,"left":170,"right":170},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":171,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":171,"right":171},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":172,"text":" if (Yaml::DUMP_OBJECT \u0026 $flags) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (Yaml::\u003cspan class=pl-c1\u003eDUMP_OBJECT\u003c/span\u003e \u0026amp; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eflags\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":3,"left":172,"right":172},{"stylingDirective":null,"type":"DELETION","blobLineNumber":173,"text":"- return '!php/object:'.serialize($value);","html":"- \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e!php/object\u003cspan class=\"x x-first\"\u003e:\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e'\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eserialize\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003evalue\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":173,"right":172},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":173,"text":"+ return '!php/object '.self::dump(serialize($value));","html":"+ \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e!php/object\u003cspan class=\"x x-first\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e'\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003eself\u003c/span\u003e\u003cspan class=\"x\"\u003e::\u003c/span\u003e\u003cspan class=\"pl-en x\"\u003edump\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eserialize\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003evalue\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003e)\u003c/span\u003e);","displayNoNewLineWarning":false,"position":5,"left":173,"right":173},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":174,"text":" }","html":" }","displayNoNewLineWarning":false,"position":6,"left":174,"right":174},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":175,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":7,"left":175,"right":175},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":176,"text":" if (Yaml::DUMP_OBJECT_AS_MAP \u0026 $flags \u0026\u0026 ($value instanceof \\stdClass || $value instanceof \\ArrayObject)) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (Yaml::\u003cspan class=pl-c1\u003eDUMP_OBJECT_AS_MAP\u003c/span\u003e \u0026amp; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eflags\u003c/span\u003e \u0026amp;\u0026amp; (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003evalue\u003c/span\u003e \u003cspan class=pl-k\u003einstanceof\u003c/span\u003e \\stdClass || \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003evalue\u003c/span\u003e \u003cspan class=pl-k\u003einstanceof\u003c/span\u003e \\ArrayObject)) {","displayNoNewLineWarning":false,"position":8,"left":176,"right":176},{"stylingDirective":null,"type":"HUNK","blobLineNumber":619,"text":"@@ -620,6 +620,8 @@ private static function evaluateScalar($scalar, $flags, $references = array())","html":"@@ -620,6 +620,8 @@ private static function evaluateScalar($scalar, $flags, $references = array())","displayNoNewLineWarning":false,"position":9,"left":619,"right":619},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":620,"text":" return (int) self::parseScalar(substr($scalar, 2), $flags);","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e (\u003cspan class=pl-smi\u003eint\u003c/span\u003e) \u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-en\u003eparseScalar\u003c/span\u003e(\u003cspan class=pl-en\u003esubstr\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-c1\u003e2\u003c/span\u003e), \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eflags\u003c/span\u003e);","displayNoNewLineWarning":false,"position":10,"left":620,"right":620},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":621,"text":" case 0 === strpos($scalar, '!php/object:'):","html":" \u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e === \u003cspan class=pl-en\u003estrpos\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!php/object:\u003c/span\u003e\u0026#39;\u003c/span\u003e):","displayNoNewLineWarning":false,"position":11,"left":621,"right":621},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":622,"text":" if (self::$objectSupport) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eobjectSupport\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":12,"left":622,"right":622},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":623,"text":"+ @trigger_error('The !php/object: tag to indicate dumped PHP objects is deprecated since version 3.4 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.', E_USER_DEPRECATED);","html":"+ @\u003cspan class=pl-en\u003etrigger_error\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eThe !php/object: tag to indicate dumped PHP objects is deprecated since version 3.4 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-c1\u003eE_USER_DEPRECATED\u003c/span\u003e);","displayNoNewLineWarning":false,"position":13,"left":622,"right":623},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":624,"text":"+","html":"+","displayNoNewLineWarning":false,"position":14,"left":622,"right":624},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":625,"text":" return unserialize(substr($scalar, 12));","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-en\u003eunserialize\u003c/span\u003e(\u003cspan class=pl-en\u003esubstr\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-c1\u003e12\u003c/span\u003e));","displayNoNewLineWarning":false,"position":15,"left":623,"right":625},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":626,"text":" }","html":" }","displayNoNewLineWarning":false,"position":16,"left":624,"right":626},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":627,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":17,"left":625,"right":627},{"stylingDirective":null,"type":"HUNK","blobLineNumber":631,"text":"@@ -630,7 +632,7 @@ private static function evaluateScalar($scalar, $flags, $references = array())","html":"@@ -630,7 +632,7 @@ private static function evaluateScalar($scalar, $flags, $references = array())","displayNoNewLineWarning":false,"position":18,"left":629,"right":631},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":632,"text":" return;","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":19,"left":630,"right":632},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":633,"text":" case 0 === strpos($scalar, '!!php/object:'):","html":" \u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e === \u003cspan class=pl-en\u003estrpos\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!!php/object:\u003c/span\u003e\u0026#39;\u003c/span\u003e):","displayNoNewLineWarning":false,"position":20,"left":631,"right":633},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":634,"text":" if (self::$objectSupport) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eobjectSupport\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":21,"left":632,"right":634},{"stylingDirective":null,"type":"DELETION","blobLineNumber":633,"text":"- @trigger_error('The !!php/object tag to indicate dumped PHP objects is deprecated since version 3.1 and will be removed in 4.0. Use the !php/object tag instead.', E_USER_DEPRECATED);","html":"- @\u003cspan class=\"pl-en\"\u003etrigger_error\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eThe !!php/object tag to indicate dumped PHP objects is deprecated since version 3.1 and will be removed in 4.0. Use the !php/object tag instead.\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eE_USER_DEPRECATED\u003c/span\u003e);","displayNoNewLineWarning":false,"position":22,"left":633,"right":634},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":635,"text":"+ @trigger_error('The !!php/object: tag to indicate dumped PHP objects is deprecated since version 3.1 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.', E_USER_DEPRECATED);","html":"+ @\u003cspan class=\"pl-en\"\u003etrigger_error\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eThe !!php/object\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003e tag to indicate dumped PHP objects is deprecated since version 3.1 and will be removed in 4.0. Use the !php/object\u003cspan class=\"x x-first x-last\"\u003e (without the colon)\u003c/span\u003e tag instead.\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eE_USER_DEPRECATED\u003c/span\u003e);","displayNoNewLineWarning":false,"position":23,"left":633,"right":635},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":636,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":24,"left":634,"right":636},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":637,"text":" return unserialize(substr($scalar, 13));","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-en\u003eunserialize\u003c/span\u003e(\u003cspan class=pl-en\u003esubstr\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-c1\u003e13\u003c/span\u003e));","displayNoNewLineWarning":false,"position":25,"left":635,"right":637},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":638,"text":" }","html":" }","displayNoNewLineWarning":false,"position":26,"left":636,"right":638},{"stylingDirective":null,"type":"HUNK","blobLineNumber":640,"text":"@@ -639,9 +641,21 @@ private static function evaluateScalar($scalar, $flags, $references = array())","html":"@@ -639,9 +641,21 @@ private static function evaluateScalar($scalar, $flags, $references = array())","displayNoNewLineWarning":false,"position":27,"left":638,"right":640},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":641,"text":" throw new ParseException('Object support when parsing a YAML file has been disabled.');","html":" \u003cspan class=pl-k\u003ethrow\u003c/span\u003e \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eParseException\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eObject support when parsing a YAML file has been disabled.\u003c/span\u003e\u0026#39;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":28,"left":639,"right":641},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":642,"text":" }","html":" }","displayNoNewLineWarning":false,"position":29,"left":640,"right":642},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":643,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":30,"left":641,"right":643},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":644,"text":"+ return;","html":"+ \u003cspan class=pl-k\u003ereturn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":31,"left":641,"right":644},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":645,"text":"+ case 0 === strpos($scalar, '!php/object'):","html":"+ \u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e === \u003cspan class=pl-en\u003estrpos\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!php/object\u003c/span\u003e\u0026#39;\u003c/span\u003e):","displayNoNewLineWarning":false,"position":32,"left":641,"right":645},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":646,"text":"+ if (self::$objectSupport) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eobjectSupport\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":33,"left":641,"right":646},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":647,"text":"+ return unserialize(self::parseScalar(substr($scalar, 12)));","html":"+ \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-en\u003eunserialize\u003c/span\u003e(\u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-en\u003eparseScalar\u003c/span\u003e(\u003cspan class=pl-en\u003esubstr\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-c1\u003e12\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":34,"left":641,"right":647},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":648,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":35,"left":641,"right":648},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":649,"text":"+","html":"+","displayNoNewLineWarning":false,"position":36,"left":641,"right":649},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":650,"text":"+ if (self::$exceptionOnInvalidType) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eexceptionOnInvalidType\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":37,"left":641,"right":650},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":651,"text":"+ throw new ParseException('Object support when parsing a YAML file has been disabled.');","html":"+ \u003cspan class=pl-k\u003ethrow\u003c/span\u003e \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eParseException\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eObject support when parsing a YAML file has been disabled.\u003c/span\u003e\u0026#39;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":38,"left":641,"right":651},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":652,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":39,"left":641,"right":652},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":653,"text":"+","html":"+","displayNoNewLineWarning":false,"position":40,"left":641,"right":653},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":654,"text":" return;","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":41,"left":642,"right":654},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":655,"text":" case 0 === strpos($scalar, '!php/const:'):","html":" \u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e === \u003cspan class=pl-en\u003estrpos\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!php/const:\u003c/span\u003e\u0026#39;\u003c/span\u003e):","displayNoNewLineWarning":false,"position":42,"left":643,"right":655},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":656,"text":" if (self::$constantSupport) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econstantSupport\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":43,"left":644,"right":656},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":657,"text":"+ @trigger_error('The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.', E_USER_DEPRECATED);","html":"+ @\u003cspan class=pl-en\u003etrigger_error\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eThe !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-c1\u003eE_USER_DEPRECATED\u003c/span\u003e);","displayNoNewLineWarning":false,"position":44,"left":644,"right":657},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":658,"text":"+","html":"+","displayNoNewLineWarning":false,"position":45,"left":644,"right":658},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":659,"text":" if (defined($const = substr($scalar, 11))) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003edefined\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econst\u003c/span\u003e = \u003cspan class=pl-en\u003esubstr\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-c1\u003e11\u003c/span\u003e))) {","displayNoNewLineWarning":false,"position":46,"left":645,"right":659},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":660,"text":" return constant($const);","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-en\u003econstant\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econst\u003c/span\u003e);","displayNoNewLineWarning":false,"position":47,"left":646,"right":660},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":661,"text":" }","html":" }","displayNoNewLineWarning":false,"position":48,"left":647,"right":661},{"stylingDirective":null,"type":"HUNK","blobLineNumber":665,"text":"@@ -652,6 +666,19 @@ private static function evaluateScalar($scalar, $flags, $references = array())","html":"@@ -652,6 +666,19 @@ private static function evaluateScalar($scalar, $flags, $references = array())","displayNoNewLineWarning":false,"position":49,"left":651,"right":665},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":666,"text":" throw new ParseException(sprintf('The string \"%s\" could not be parsed as a constant. Have you forgotten to pass the \"Yaml::PARSE_CONSTANT\" flag to the parser?', $scalar));","html":" \u003cspan class=pl-k\u003ethrow\u003c/span\u003e \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eParseException\u003c/span\u003e(\u003cspan class=pl-en\u003esprintf\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eThe string \u0026quot;%s\u0026quot; could not be parsed as a constant. Have you forgotten to pass the \u0026quot;Yaml::PARSE_CONSTANT\u0026quot; flag to the parser?\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e));","displayNoNewLineWarning":false,"position":50,"left":652,"right":666},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":667,"text":" }","html":" }","displayNoNewLineWarning":false,"position":51,"left":653,"right":667},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":668,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":52,"left":654,"right":668},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":669,"text":"+ return;","html":"+ \u003cspan class=pl-k\u003ereturn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":53,"left":654,"right":669},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":670,"text":"+ case 0 === strpos($scalar, '!php/const'):","html":"+ \u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e === \u003cspan class=pl-en\u003estrpos\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!php/const\u003c/span\u003e\u0026#39;\u003c/span\u003e):","displayNoNewLineWarning":false,"position":54,"left":654,"right":670},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":671,"text":"+ if (self::$constantSupport) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econstantSupport\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":55,"left":654,"right":671},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":672,"text":"+ if (defined($const = self::parseScalar(substr($scalar, 11)))) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003edefined\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econst\u003c/span\u003e = \u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-en\u003eparseScalar\u003c/span\u003e(\u003cspan class=pl-en\u003esubstr\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-c1\u003e11\u003c/span\u003e)))) {","displayNoNewLineWarning":false,"position":56,"left":654,"right":672},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":673,"text":"+ return constant($const);","html":"+ 8000 \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-en\u003econstant\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econst\u003c/span\u003e);","displayNoNewLineWarning":false,"position":57,"left":654,"right":673},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":674,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":58,"left":654,"right":674},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":675,"text":"+","html":"+","displayNoNewLineWarning":false,"position":59,"left":654,"right":675},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":676,"text":"+ throw new ParseException(sprintf('The constant \"%s\" is not defined.', $const));","html":"+ \u003cspan class=pl-k\u003ethrow\u003c/span\u003e \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eParseException\u003c/span\u003e(\u003cspan class=pl-en\u003esprintf\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eThe constant \u0026quot;%s\u0026quot; is not defined.\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econst\u003c/span\u003e));","displayNoNewLineWarning":false,"position":60,"left":654,"right":676},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":677,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":61,"left":654,"right":677},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":678,"text":"+ if (self::$exceptionOnInvalidType) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eexceptionOnInvalidType\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":62,"left":654,"right":678},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":679,"text":"+ throw new ParseException(sprintf('The string \"%s\" could not be parsed as a constant. Have you forgotten to pass the \"Yaml::PARSE_CONSTANT\" flag to the parser?', $scalar));","html":"+ \u003cspan class=pl-k\u003ethrow\u003c/span\u003e \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eParseException\u003c/span\u003e(\u003cspan class=pl-en\u003esprintf\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eThe string \u0026quot;%s\u0026quot; could not be parsed as a constant. Have you forgotten to pass the \u0026quot;Yaml::PARSE_CONSTANT\u0026quot; flag to the parser?\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e));","displayNoNewLineWarning":false,"position":63,"left":654,"right":679},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":680,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":64,"left":654,"right":680},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":681,"text":"+","html":"+","displayNoNewLineWarning":false,"position":65,"left":654,"right":681},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":682,"text":" return;","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":66,"left":655,"right":682},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":683,"text":" case 0 === strpos($scalar, '!!float '):","html":" \u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e === \u003cspan class=pl-en\u003estrpos\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!!float \u003c/span\u003e\u0026#39;\u003c/span\u003e):","displayNoNewLineWarning":false,"position":67,"left":656,"right":683},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":684,"text":" return (float) substr($scalar, 8);","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e (\u003cspan class=pl-smi\u003efloat\u003c/span\u003e) \u003cspan class=pl-en\u003esubstr\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003escalar\u003c/span\u003e, \u003cspan class=pl-c1\u003e8\u003c/span\u003e);","displayNoNewLineWarning":false,"position":68,"left":657,"right":684}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":842,"linesChanged":31,"newTreeEntry":{"lineCount":842,"path":"Inline.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Inline.php","mode":100644},"linesAdded":29,"linesDeleted":2,"path":"Inline.php","pathDigest":"2a3477ea5864dee92f89d44d0ab1851591b85371fe196bc711fa1399709ecd92","status":"MODIFIED","truncatedReason":null,"oldOid":"99f52b149bfb50ed118162305ffa4e9765cc025f","newOid":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","copilotChatReference":null,"deletedSha":"99f52b149bfb50ed118162305ffa4e9765cc025f","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":211,"text":"@@ -212,7 +212,7 @@ private function doParse($value, $flags)","html":"@@ -212,7 +212,7 @@ private function doParse($value, $flags)","displayNoNewLineWarning":false,"position":0,"left":211,"right":211},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":212,"text":" $this-\u003erefs[$isRef] = end($data);","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003erefs\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eisRef\u003c/span\u003e] = \u003cspan class=pl-en\u003eend\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003edata\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":212,"right":212},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":213,"text":" }","html":" }","displayNoNewLineWarning":false,"position":2,"left":213,"right":213},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":214,"text":" } elseif (","html":" } \u003cspan class=pl-k\u003eelseif\u003c/span\u003e (","displayNoNewLineWarning":false,"position":3,"left":214,"right":214},{"stylingDirective":null,"type":"DELETION","blobLineNumber":215,"text":"- self::preg_match('#^(?P\u003ckey\u003e'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?(?:![^\\s]++\\s++)?[^ \\'\"\\[\\{!].*?) *\\:(\\s++(?P\u003cvalue\u003e.+))?$#u', rtrim($this-\u003ecurrentLine), $values)","html":"- \u003cspan class=\"pl-smi\"\u003eself\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003epreg_match\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e#^(?P\u0026lt;key\u0026gt;\u003c/span\u003e'\u003c/span\u003e.Inline::\u003cspan class=\"pl-c1\"\u003eREGEX_QUOTED_STRING\u003c/span\u003e.\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e|(?:!?!php/const:)?\u003cspan class=\"x x-first x-last\"\u003e(?:![^\\s]++\\s++)?[^\u003c/span\u003e \u003c/span\u003e\\'\u003cspan class=\"pl-s\"\u003e\"\\[\\{!].*?) *\\:(\\s++(?P\u0026lt;value\u0026gt;.+))?$#u\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003ertrim\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003ecurrentLine\u003c/span\u003e), \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003evalues\u003c/span\u003e)","displayNoNewLineWarning":false,"position":4,"left":215,"right":214},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":215,"text":"+ self::preg_match('#^(?P\u003ckey\u003e(?:![^\\s]++\\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \\'\"\\[\\{!].*?)) *\\:(\\s++(?P\u003cvalue\u003e.+))?$#u', rtrim($this-\u003ecurrentLine), $values)","html":"+ \u003cspan class=\"pl-smi\"\u003eself\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003epreg_match\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e#^(?P\u0026lt;key\u0026gt;\u003cspan class=\"x x-first x-last\"\u003e(?:![^\\s]++\\s++)?(?:\u003c/span\u003e\u003c/span\u003e'\u003c/span\u003e.Inline::\u003cspan class=\"pl-c1\"\u003eREGEX_QUOTED_STRING\u003c/span\u003e.\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e|(?:!?!php/const:)?\u003cspan class=\"x x-first x-last\"\u003e[^\u003c/span\u003e \u003c/span\u003e\\'\u003cspan class=\"pl-s\"\u003e\"\\[\\{!].*?\u003cspan class=\"x x-first x-last\"\u003e)\u003c/span\u003e) *\\:(\\s++(?P\u0026lt;value\u0026gt;.+))?$#u\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003ertrim\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003ecurrentLine\u003c/span\u003e), \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003evalues\u003c/span\u003e)","displayNoNewLineWarning":false,"position":5,"left":215,"right":215},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":216,"text":" \u0026\u0026 (false === strpos($values['key'], ' #') || in_array($values['key'][0], array('\"', \"'\")))","html":" \u0026amp;\u0026amp; (\u003cspan class=pl-c1\u003efalse\u003c/span\u003e === \u003cspan class=pl-en\u003estrpos\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003evalues\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ekey\u003c/span\u003e\u0026#39;\u003c/span\u003e], \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e #\u003c/span\u003e\u0026#39;\u003c/span\u003e) || \u003cspan class=pl-en\u003ein_array\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003evalues\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ekey\u003c/span\u003e\u0026#39;\u003c/span\u003e][\u003cspan class=pl-c1\u003e0\u003c/span\u003e], \u003cspan class=pl-en\u003earray\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e\u0026quot;\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;\u003cspan class=pl-s\u003e\u0026#39;\u003c/span\u003e\u0026quot;\u003c/span\u003e)))","displayNoNewLineWarning":false,"position":6,"left":216,"right":216},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":217,"text":" ) {","html":" ) {","displayNoNewLineWarning":false,"position":7,"left":217,"right":217},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":218,"text":" if ($context \u0026\u0026 'sequence' == $context) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econtext\u003c/span\u003e \u0026amp;\u0026amp; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003esequence\u003c/span\u003e\u0026#39;\u003c/span\u003e == \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003econtext\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":8,"left":218,"right":218}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1056,"linesChanged":2,"newTreeEntry":{"lineCount":1056,"path":"Parser.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Parser.php","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"Parser.php","pathDigest":"1a7c1850f88287936713a7072af9331818e14581fc71feed100c41e1747593ce","status":"MODIFIED","truncatedReason":null,"oldOid":"99f52b149bfb50ed118162305ffa4e9765cc025f","newOid":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","copilotChatReference":null,"deletedSha":"99f52b149bfb50ed118162305ffa4e9765cc025f","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":53,"text":"@@ -54,7 +54,7 @@ public function testLintIncorrectFile()","html":"@@ -54,7 +54,7 @@ public function testLintIncorrectFile()","displayNoNewLineWarning":false,"position":0,"left":53,"right":53},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":54,"text":" public function testConstantAsKey()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestConstantAsKey\u003c/span\u003e()","displayNoNewLineWarning":false,"position":1,"left":54,"right":54},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":55,"text":" {","html":" {","displayNoNewLineWarning":false,"position":2,"left":55,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" $yaml = \u003c\u003c\u003cYAML","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eyaml\u003c/span\u003e = \u003cspan class=pl-s\u003e\u0026lt;\u0026lt;\u0026lt;YAML\u003cspan class=pl-s\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":56,"right":56},{"stylingDirective":null,"type":"DELETION","blobLineNumber":57,"text":"-!php/const:Symfony\\Component\\Yaml\\Tests\\Command\\Foo::TEST: bar","html":"-\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e!php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eSymfony\\Component\\Yaml\\Tests\\Command\\Foo::TEST: bar\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":57,"right":56},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":57,"text":"+!php/const 'Symfony\\Component\\Yaml\\Tests\\Command\\Foo::TEST': bar","html":"+\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e!php/const\u003cspan class=\"x x-first x-last\"\u003e '\u003c/span\u003eSymfony\\Component\\Yaml\\Tests\\Command\\Foo::TEST\u003cspan class=\"x x-first x-last\"\u003e'\u003c/span\u003e: bar\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":57,"right":57},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":58,"text":" YAML;","html":" \u003cspan class=pl-s\u003eYAML\u003c/span\u003e;","displayNoNewLineWarning":false,"position":6,"left":58,"right":58},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":59,"text":" $ret = $this-\u003ecreateCommandTester()-\u003eexecute(array('filename' =\u003e $this-\u003ecreateFile($yaml)), array('verbosity' =\u003e OutputInterface::VERBOSITY_VERBOSE, 'decorated' =\u003e false));","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eret\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003ecreateCommandTester\u003c/span\u003e()-\u0026gt;\u003cspan class=pl-en\u003eexecute\u003c/span\u003e(\u003cspan class=pl-en\u003earray\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003efilename\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003ecreateFile\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eyaml\u003c/span\u003e)), \u003cspan class=pl-en\u003earray\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003everbosity\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; OutputInterface::\u003cspan class=pl-c1\u003eVERBOSITY_VERBOSE\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003edecorated\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-c1\u003efalse\u003c/span\u003e));","displayNoNewLineWarning":false,"position":7,"left":59,"right":59},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":60,"text":" $this-\u003eassertSame(0, $ret, 'lint:yaml exits with code 0 in case of success');","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eassertSame\u003c/span\u003e(\u003cspan class=pl-c1\u003e0\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eret\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003elint:yaml exits with code 0 in case of success\u003c/span\u003e\u0026#39;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":8,"left":60,"right":60}],"diffNumber":3,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":121,"linesChanged":2,"newTreeEntry":{"lineCount":121,"path":"Tests/Command/LintCommandTest.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Tests/Command/LintCommandTest.php","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"Tests/Command/LintCommandTest.php","pathDigest":"f8cc4ada772a5f11f8378c6a73507074834c499eb59a0f83d1f1a5a79b2ea364","status":"MODIFIED","truncatedReason":null,"oldOid":"99f52b149bfb50ed118162305ffa4e9765cc025f","newOid":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","copilotChatReference":null,"deletedSha":"99f52b149bfb50ed118162305ffa4e9765cc025f","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":209,"text":"@@ -210,7 +210,7 @@ public function testObjectSupportEnabled()","html":"@@ -210,7 +210,7 @@ public function testObjectSupportEnabled()","displayNoNewLineWarning":false,"position":0,"left":209,"right":209},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":210,"text":" {","html":" {","displayNoNewLineWarning":false,"position":1,"left":210,"right":210},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":211,"text":" $dump = $this-\u003edumper-\u003edump(array('foo' =\u003e new A(), 'bar' =\u003e 1), 0, 0, Yaml::DUMP_OBJECT);","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003edump\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003edumper\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003edump\u003c/span\u003e(\u003cspan class=pl-en\u003earray\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003efoo\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eA\u003c/span\u003e(), \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ebar\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-c1\u003e1\u003c/span\u003e), \u003cspan class=pl-c1\u003e0\u003c/span\u003e, \u003cspan class=pl-c1\u003e0\u003c/span\u003e, Yaml::\u003cspan class=pl-c1\u003eDUMP_OBJECT\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":211,"right":211},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":212,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":212,"right":212},{"stylingDirective":null,"type":"DELETION","blobLineNumber":213,"text":"- $this-\u003eassertEquals('{ foo: !php/object:O:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}, bar: 1 }', $dump, '-\u003edump() is able to dump objects');","html":"- \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eassertEquals\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e{ foo: !php/object\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eO:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}, bar: 1 }\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003edump\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e-\u0026gt;dump() is able to dump objects\u003c/span\u003e'\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":213,"right":212},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":213,"text":"+ $this-\u003eassertEquals('{ foo: !php/object \\'O:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}\\', bar: 1 }', $dump, '-\u003edump() is able to dump objects');","html":"+ \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eassertEquals\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e{ foo: !php/object\u003cspan class=\"x x-first\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e\\'\u003c/span\u003e\u003cspan class=\"pl-s\"\u003eO:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003e\\'\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e, bar: 1 }\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003edump\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e-\u0026gt;dump() is able to dump objects\u003c/span\u003e'\u003c/span\u003e);","displayNoNewLineWarning":false,"position":5,"left":213,"right":213},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":214,"text":" }","html":" }","displayNoNewLineWarning":false,"position":6,"left":214,"right":214},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":215,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":7,"left":215,"right":215},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":216,"text":" /**","html":" \u003cspan class=pl-c\u003e/**\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":216,"right":216},{"stylingDirective":null,"type":"HUNK","blobLineNumber":219,"text":"@@ -220,7 +220,7 @@ public function testObjectSupportEnabledPassingTrue()","html":"@@ -220,7 +220,7 @@ public function testObjectSupportEnabledPassingTrue()","displayNoNewLineWarning":false,"position":9,"left":219,"right":219},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":220,"text":" {","html":" {","displayNoNewLineWarning":false,"position":10,"left":220,"right":220},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":221,"text":" $dump = $this-\u003edumper-\u003edump(array('foo' =\u003e new A(), 'bar' =\u003e 1), 0, 0, false, true);","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003edump\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003edumper\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003edump\u003c/span\u003e(\u003cspan class=pl-en\u003earray\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003efoo\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eA\u003c/span\u003e(), \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ebar\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-c1\u003e1\u003c/span\u003e), \u003cspan class=pl-c1\u003e0\u003c/span\u003e, \u003cspan class=pl-c1\u003e0\u003c/span\u003e, \u003cspan class=pl-c1\u003efalse\u003c/span\u003e, \u003cspan class=pl-c1\u003etrue\u003c/span\u003e);","displayNoNewLineWarning":false,"position":11,"left":221,"right":221},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":222,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":12,"left":222,"right":222},{"stylingDirective":null,"type":"DELETION","blobLineNumber":223,"text":"- $this-\u003eassertEquals('{ foo: !php/object:O:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}, bar: 1 }', $dump, '-\u003edump() is able to dump objects');","html":"- \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eassertEquals\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e{ foo: !php/object\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eO:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}, bar: 1 }\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003edump\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e-\u0026gt;dump() is able to dump objects\u003c/span\u003e'\u003c/span\u003e);","displayNoNewLineWarning":false,"position":13,"left":223,"right":222},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":223,"text":"+ $this-\u003eassertEquals('{ foo: !php/object \\'O:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}\\', bar: 1 }', $dump, '-\u003edump() is able to dump objects');","html":"+ \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eassertEquals\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e{ foo: !php/object\u003cspan class=\"x x-first\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e\\'\u003c/span\u003e\u003cspan class=\"pl-s\"\u003eO:30:\"Symfony\\Component\\Yaml\\Tests\\A\":1:{s:1:\"a\";s:3:\"foo\";}\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003e\\'\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e, bar: 1 }\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003edump\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e-\u0026gt;dump() is able to dump objects\u003c/span\u003e'\u003c/span\u003e);","displayNoNewLineWarning":false,"position":14,"left":223,"right":223},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":224,"text":" }","html":" }","displayNoNewLineWarning":false,"position":15,"left":224,"right":224},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":225,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":16,"left":225,"right":225},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":226,"text":" public function testObjectSupportDisabledButNoExceptions()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestObjectSupportDisabledButNoExceptions\u003c/span\u003e()","displayNoNewLineWarning":false,"position":17,"left":226,"right":226}],"diffNumber":4,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":478,"linesChanged":4,"newTreeEntry":{"lineCount":478,"path":"Tests/DumperTest.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Tests/DumperTest.php","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"Tests/DumperTest.php","pathDigest":"0e9e8fa1f4d1f93e10c910aac7b4b8b3ba0719db1033e336f10950d366aa8aa8","status":"MODIFIED","truncatedReason":null,"oldOid":"99f52b149bfb50ed118162305ffa4e9765cc025f","newOid":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","copilotChatReference":null,"deletedSha":"99f52b149bfb50ed118162305ffa4e9765cc025f","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":48,"text":"@@ -49,10 +49,10 @@ public function testParsePhpConstants($yaml, $value)","html":"@@ -49,10 +49,10 @@ public function testParsePhpConstants($yaml, $value)","displayNoNewLineWarning":false,"position":0,"left":48,"right":48},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":49,"text":" public function getTestsForParsePhpConstants()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003egetTestsForParsePhpConstants\u003c/span\u003e()","displayNoNewLineWarning":false,"position":1,"left":49,"right":49},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":50,"text":" {","html":" {","displayNoNewLineWarning":false,"position":2,"left":50,"right":50},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":51,"text":" return array(","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":3,"left":51,"right":51},{"stylingDirective":null,"type":"DELETION","blobLineNumber":52,"text":"- array('!php/const:Symfony\\Component\\Yaml\\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT),","html":"- \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e!php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eSymfony\\Component\\Yaml\\Yaml::PARSE_CONSTANT\u003c/span\u003e'\u003c/span\u003e, Yaml::\u003cspan class=\"pl-c1\"\u003ePARSE_CONSTANT\u003c/span\u003e),","displayNoNewLineWarning":false,"position":4,"left":52,"right":51},{"stylingDirective":null,"type":"DELETION","blobLineNumber":53,"text":"- array('!php/const:PHP_INT_MAX', PHP_INT_MAX),","html":"- \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e!php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003ePHP_INT_MAX\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003ePHP_INT_MAX\u003c/span\u003e),","displayNoNewLineWarning":false,"position":5,"left":53,"right":51},{"stylingDirective":null,"type":"DELETION","blobLineNumber":54,"text":"- array('[!php/const:PHP_INT_MAX]', array(PHP_INT_MAX)),","html":"- \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e[!php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003ePHP_INT_MAX]\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003ePHP_INT_MAX\u003c/span\u003e)),","displayNoNewLineWarning":false,"position":6,"left":54,"right":51},{"stylingDirective":null,"type":"DELETION","blobLineNumber":55,"text":"- array('{ foo: !php/const:PHP_INT_MAX }', array('foo' =\u003e PHP_INT_MAX)),","html":"- \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e{ foo: !php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003ePHP_INT_MAX }\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003efoo\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \u003cspan class=\"pl-c1\" 8000 \u003ePHP_INT_MAX\u003c/span\u003e)),","displayNoNewLineWarning":false,"position":7,"left":55,"right":51},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":52,"text":"+ array('!php/const Symfony\\Component\\Yaml\\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT),","html":"+ \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e!php/const\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003eSymfony\\Component\\Yaml\\Yaml::PARSE_CONSTANT\u003c/span\u003e'\u003c/span\u003e, Yaml::\u003cspan class=\"pl-c1\"\u003ePARSE_CONSTANT\u003c/span\u003e),","displayNoNewLineWarning":false,"position":8,"left":55,"right":52},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":53,"text":"+ array('!php/const PHP_INT_MAX', PHP_INT_MAX),","html":"+ \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e!php/const\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003ePHP_INT_MAX\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003ePHP_INT_MAX\u003c/span\u003e),","displayNoNewLineWarning":false,"position":9,"left":55,"right":53},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":54,"text":"+ array('[!php/const PHP_INT_MAX]', array(PHP_INT_MAX)),","html":"+ \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e[!php/const\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003ePHP_INT_MAX]\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003ePHP_INT_MAX\u003c/span\u003e)),","displayNoNewLineWarning":false,"position":10,"left":55,"right":54},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":55,"text":"+ array('{ foo: !php/const PHP_INT_MAX }', array('foo' =\u003e PHP_INT_MAX)),","html":"+ \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e{ foo: !php/const\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003ePHP_INT_MAX }\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003earray\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003efoo\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \u003cspan class=\"pl-c1\"\u003ePHP_INT_MAX\u003c/span\u003e)),","displayNoNewLineWarning":false,"position":11,"left":55,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" );","html":" );","displayNoNewLineWarning":false,"position":12,"left":56,"right":56},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":57,"text":" }","html":" }","displayNoNewLineWarning":false,"position":13,"left":57,"right":57},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":58,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":14,"left":58,"right":58},{"stylingDirective":null,"type":"HUNK","blobLineNumber":61,"text":"@@ -62,16 +62,25 @@ public function getTestsForParsePhpConstants()","html":"@@ -62,16 +62,25 @@ public function getTestsForParsePhpConstants()","displayNoNewLineWarning":false,"position":15,"left":61,"right":61},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":62,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":16,"left":62,"right":62},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":63,"text":" public function testParsePhpConstantThrowsExceptionWhenUndefined()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestParsePhpConstantThrowsExceptionWhenUndefined\u003c/span\u003e()","displayNoNewLineWarning":false,"position":17,"left":63,"right":63},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":64,"text":" {","html":" {","displayNoNewLineWarning":false,"position":18,"left":64,"right":64},{"stylingDirective":null,"type":"DELETION","blobLineNumber":65,"text":"- Inline::parse('!php/const:WRONG_CONSTANT', Yaml::PARSE_CONSTANT);","html":"- Inline::\u003cspan class=\"pl-en\"\u003eparse\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e!php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eWRONG_CONSTANT\u003c/span\u003e'\u003c/span\u003e, Yaml::\u003cspan class=\"pl-c1\"\u003ePARSE_CONSTANT\u003c/span\u003e);","displayNoNewLineWarning":false,"position":19,"left":65,"right":64},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":65,"text":"+ Inline::parse('!php/const WRONG_CONSTANT', Yaml::PARSE_CONSTANT);","html":"+ Inline::\u003cspan class=\"pl-en\"\u003eparse\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003e!php/const\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003eWRONG_CONSTANT\u003c/span\u003e'\u003c/span\u003e, Yaml::\u003cspan class=\"pl-c1\"\u003ePARSE_CONSTANT\u003c/span\u003e);","displayNoNewLineWarning":false,"position":20,"left":65,"right":65},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":66,"text":" }","html":" }","displayNoNewLineWarning":false,"position":21,"left":66,"right":66},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":67,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":22,"left":67,"right":67},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":68,"text":" /**","html":" \u003cspan class=pl-c\u003e/**\u003c/span\u003e","displayNoNewLineWarning":false,"position":23,"left":68,"right":68},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":69,"text":" * @expectedException \\Symfony\\Component\\Yaml\\Exception\\ParseException","html":" \u003cspan class=pl-c\u003e * @expectedException \\Symfony\\Component\\Yaml\\Exception\\ParseException\u003c/span\u003e","displayNoNewLineWarning":false,"position":24,"left":69,"right":69},{"stylingDirective":null,"type":"DELETION","blobLineNumber":70,"text":"- * @expectedExceptionMessageRegExp #The string \"!php/const:PHP_INT_MAX\" could not be parsed as a constant.*#","html":"-\u003cspan class=\"pl-c\"\u003e * @expectedExceptionMessageRegExp #The string \"!php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003ePHP_INT_MAX\" could not be parsed as a constant.*#\u003c/span\u003e","displayNoNewLineWarning":false,"position":25,"left":70,"right":69},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":70,"text":"+ * @expectedExceptionMessageRegExp #The string \"!php/const PHP_INT_MAX\" could not be parsed as a constant.*#","html":"+\u003cspan class=\"pl-c\"\u003e * @expectedExceptionMessageRegExp #The string \"!php/const\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003ePHP_INT_MAX\" could not be parsed as a constant.*#\u003c/span\u003e","displayNoNewLineWarning":false,"position":26,"left":70,"right":70},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":71,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":27,"left":71,"right":71},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":72,"text":" public function testParsePhpConstantThrowsExceptionOnInvalidType()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestParsePhpConstantThrowsExceptionOnInvalidType\u003c/span\u003e()","displayNoNewLineWarning":false,"position":28,"left":72,"right":72},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":73,"text":" {","html":" {","displayNoNewLineWarning":false,"position":29,"left":73,"right":73},{"stylingDirective":null,"type":"DELETION","blobLineNumber":74,"text":"- Inline::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);","html":"- Inline::\u003cspan class=pl-en\u003eparse\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!php/const:PHP_INT_MAX\u003c/span\u003e\u0026#39;\u003c/span\u003e, Yaml::\u003cspan class=pl-c1\u003ePARSE_EXCEPTION_ON_INVALID_TYPE\u003c/span\u003e);","displayNoNewLineWarning":false,"position":30,"left":74,"right":73},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":74,"text":"+ Inline::parse('!php/const PHP_INT_MAX', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);","html":"+ Inline::\u003cspan class=pl-en\u003eparse\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!php/const PHP_INT_MAX\u003c/span\u003e\u0026#39;\u003c/span\u003e, Yaml::\u003cspan class=pl-c1\u003ePARSE_EXCEPTION_ON_INVALID_TYPE\u003c/span\u003e);","displayNoNewLineWarning":false,"position":31,"left":74,"right":74},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":75,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":32,"left":74,"right":75},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":76,"text":"+","html":"+","displayNoNewLineWarning":false,"position":33,"left":74,"right":76},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":77,"text":"+ /**","html":"+ \u003cspan class=pl-c\u003e/**\u003c/span\u003e","displayNoNewLineWarning":false,"position":34,"left":74,"right":77},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":78,"text":"+ * @group legacy","html":"+\u003cspan class=pl-c\u003e * @group legacy\u003c/span\u003e","displayNoNewLineWarning":false,"position":35,"left":74,"right":78},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":79,"text":"+ * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.","html":"+\u003cspan class=pl-c\u003e * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.\u003c/span\u003e","displayNoNewLineWarning":false,"position":36,"left":74,"right":79},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":80,"text":"+ */","html":"+\u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":37,"left":74,"right":80},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":81,"text":"+ public function testDeprecatedConstantTag()","html":"+ \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestDeprecatedConstantTag\u003c/span\u003e()","displayNoNewLineWarning":false,"position":38,"left":74,"right":81},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":82,"text":"+ {","html":"+ {","displayNoNewLineWarning":false,"position":39,"left":74,"right":82},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":83,"text":"+ Inline::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_CONSTANT);","html":"+ Inline::\u003cspan class=pl-en\u003eparse\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e!php/const:PHP_INT_MAX\u003c/span\u003e\u0026#39;\u003c/span\u003e, Yaml::\u003cspan class=pl-c1\u003ePARSE_CONSTANT\u003c/span\u003e);","displayNoNewLineWarning":false,"position":40,"left":74,"right":83},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":84,"text":" }","html":" }","displayNoNewLineWarning":false,"position":41,"left":75,"right":84},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":85,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":42,"left":76,"right":85},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":86,"text":" /**","html":" \u003cspan class=pl-c\u003e/**\u003c/span\u003e","displayNoNewLineWarning":false,"position":43,"left":77,"right":86}],"diffNumber":5,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":779,"linesChanged":23,"newTreeEntry":{"lineCount":779,"path":"Tests/InlineTest.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Tests/InlineTest.php","mode":100644},"linesAdded":16,"linesDeleted":7,"path":"Tests/InlineTest.php","pathDigest":"6b3ff6c584a677c864358822127374bc2ebd9416613c89bb5a54a7e8d5a5b2d8","status":"MODIFIED","truncatedReason":null,"oldOid":"99f52b149bfb50ed118162305ffa4e9765cc025f","newOid":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","copilotChatReference":null,"deletedSha":"99f52b149bfb50ed118162305ffa4e9765cc025f","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":470,"text":"@@ -471,7 +471,7 @@ public function testBlockLiteralWithLeadingNewlines()","html":"@@ -471,7 +471,7 @@ public function testBlockLiteralWithLeadingNewlines()","displayNoNewLineWarning":false,"position":0,"left":470,"right":470},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":471,"text":" public function testObjectSupportEnabled()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestObjectSupportEnabled\u003c/span\u003e()","displayNoNewLineWarning":false,"position":1,"left":471,"right":471},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":472,"text":" {","html":" {","displayNoNewLineWarning":false,"position":2,"left":472,"right":472},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":473,"text":" $input = \u003c\u003c\u003c'EOF'","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einput\u003c/span\u003e = \u0026lt;\u0026lt;\u0026lt;\u0026#39;EOF\u0026#39;\u003cspan class=pl-s\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":473,"right":473},{"stylingDirective":null,"type":"DELETION","blobLineNumber":474,"text":"-foo: !php/object:O:30:\"Symfony\\Component\\Yaml\\Tests\\B\":1:{s:1:\"b\";s:3:\"foo\";}","html":"-\u003cspan class=\"pl-s\"\u003efoo: !php/object\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eO:30:\"Symfony\\Component\\Yaml\\Tests\\B\":1:{s:1:\"b\";s:3:\"foo\";}\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":474,"right":473},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":474,"text":"+foo: !php/object O:30:\"Symfony\\Component\\Yaml\\Tests\\B\":1:{s:1:\"b\";s:3:\"foo\";}","html":"+\u003cspan class=\"pl-s\"\u003efoo: !php/object\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003eO:30:\"Symfony\\Component\\Yaml\\Tests\\B\":1:{s:1:\"b\";s:3:\"foo\";}\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":474,"right":474},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":475,"text":" bar: 1","html":" \u003cspan class=pl-s\u003ebar: 1\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":475,"right":475},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":476,"text":" EOF;","html":" EOF;","displayNoNewLineWarning":false,"position":7,"left":476,"right":476},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":477,"text":" $this-\u003eassertEquals(array('foo' =\u003e new B(), 'bar' =\u003e 1), $this-\u003eparser-\u003eparse($input, Yaml::PARSE_OBJECT), '-\u003eparse() is able to parse objects');","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eassertEquals\u003c/span\u003e(\u003cspan class=pl-en\u003earray\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003efoo\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eB\u003c/span\u003e(), \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ebar\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-c1\u003e1\u003c/span\u003e), \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eparser\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eparse\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einput\u003c/span\u003e, Yaml::\u003cspan class=pl-c1\u003ePARSE_OBJECT\u003c/span\u003e), \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e-\u0026gt;parse() is able to parse objects\u003c/span\u003e\u0026#39;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":8,"left":477,"right":477},{"stylingDirective":null,"type":"HUNK","blobLineNumber":490,"text":"@@ -491,14 +491,29 @@ public function testObjectSupportEnabledPassingTrue()","html":"@@ -491,14 +491,29 @@ public function testObjectSupportEnabledPassingTrue()","displayNoNewLineWarning":false,"position":9,"left":490,"right":490},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":491,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":10,"left":491,"right":491},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":492,"text":" /**","html":" \u003cspan class=pl-c\u003e/**\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":492,"right":492},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":493,"text":" * @group legacy","html":" \u003cspan class=pl-c\u003e * @group legacy\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":493,"right":493},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":494,"text":"+ * @dataProvider deprecatedObjectValueProvider","html":"+\u003cspan class=pl-c\u003e * @dataProvider deprecatedObjectValueProvider\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":493,"right":494},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":495,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":14,"left":494,"right":495},{"stylingDirective":null,"type":"DELETION","blobLineNumber":495,"text":"- public function testObjectSupportEnabledWithDeprecatedTag()","html":"- \u003cspan class=\"pl-k\"\u003epublic\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e \u003cspan class=\"pl-en\"\u003etestObjectSupportEnabledWithDeprecatedTag\u003c/span\u003e()","displayNoNewLineWarning":false,"position":15,"left":495,"right":495},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":496,"text":"+ public function testObjectSupportEnabledWithDeprecatedTag($yaml)","html":"+ \u003cspan class=\"pl-k\"\u003epublic\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e \u003cspan class=\"pl-en\"\u003etestObjectSupportEnabledWithDeprecatedTag\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x x-first\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-last\"\u003eyaml\u003c/span\u003e\u003c/span\u003e)","displayNoNewLineWarning":false,"position":16,"left":495,"right":496},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":497,"text":" {","html":" {","displayNoNewLineWarning":false,"position":17,"left":496,"right":497},{"stylingDirective":null,"type":"DELETION","blobLineNumber":497,"text":"- $input = \u003c\u003c\u003c'EOF'","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einput\u003c/span\u003e = \u0026lt;\u0026lt;\u0026lt;\u0026#39;EOF\u0026#39;\u003cspan class=pl-s\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":18,"left":497,"right":497},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":498,"text":"+ $this-\u003eassertEquals(array('foo' =\u003e new B(), 'bar' =\u003e 1), $this-\u003eparser-\u003eparse($yaml, Yaml::PARSE_OBJECT), '-\u003eparse() is able to parse objects');","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eassertEquals\u003c/span\u003e(\u003cspan class=pl-en\u003earray\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003efoo\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eB\u003c/span\u003e(), \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ebar\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-c1\u003e1\u003c/span\u003e), \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eparser\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eparse\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eyaml\u003c/span\u003e, Yaml::\u003cspan class=pl-c1\u003ePARSE_OBJECT\u003c/span\u003e), \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e-\u0026gt;parse() is able to parse objects\u003c/span\u003e\u0026#39;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":19,"left":497,"right":498},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":499,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":20,"left":497,"right":499},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":500,"text":"+","html":"+","displayNoNewLineWarning":false,"position":21,"left":497,"right":500},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":501,"text":"+ public function deprecatedObjectValueProvider()","html":"+ \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003edeprecatedObjectValueProvider\u003c/span\u003e()","displayNoNewLineWarning":false,"position":22,"left":497,"right":501},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":502,"text":"+ {","html":"+ {","displayNoNewLineWarning":false,"position":23,"left":497,"right":502},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":503,"text":"+ return array(","html":"+ \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":24,"left":497,"right":503},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":504,"text":"+ array(","html":"+ \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":25,"left":497,"right":504},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":505,"text":"+ \u003c\u003c\u003cYAML","html":"+ \u003cspan class=pl-s\u003e\u0026lt;\u0026lt;\u0026lt;YAML\u003cspan class=pl-s\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":26,"left":497,"right":505},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":506,"text":" foo: !!php/object:O:30:\"Symfony\\Component\\Yaml\\Tests\\B\":1:{s:1:\"b\";s:3:\"foo\";}","html":" \u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003efoo: !!php/object:O:30:\u0026quot;Symfony\\Component\\Yaml\\Tests\\B\u0026quot;:1:{s:1:\u0026quot;b\u0026quot;;s:3:\u0026quot;foo\u0026quot;;}\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":27,"left":498,"right":506},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":507,"text":" bar: 1","html":" \u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003ebar: 1\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":28,"left":499,"right":507},{"stylingDirective":null,"type":"DELETION","blobLineNumber":500,"text":"-EOF;","html":"-EOF;","displayNoNewLineWarning":false,"position":29,"left":500,"right":507},{"stylingDirective":null,"type":"DELETION","blobLineNumber":501,"text":"- $this-\u003eassertEquals(array('foo' =\u003e new B(), 'bar' =\u003e 1), $this-\u003eparser-\u003eparse($input, Yaml::PARSE_OBJECT), '-\u003eparse() is able to parse objects');","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eassertEquals\u003c/span\u003e(\u003cspan class=pl-en\u003earray\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003efoo\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eB\u003c/span\u003e(), \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ebar\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-c1\u003e1\u003c/span\u003e), \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eparser\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eparse\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einput\u003c/span\u003e, Yaml::\u003cspan class=pl-c1\u003ePARSE_OBJECT\u003c/span\u003e), \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e-\u0026gt;parse() is able to parse objects\u003c/span\u003e\u0026#39;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":30,"left":501,"right":507},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":508,"text":"+YAML","html":"+\u003cspan class=pl-s\u003eYAML\u003c/span\u003e","displayNoNewLineWarning":false,"position":31,"left":501,"right":508},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":509,"text":"+ ),","html":"+ ),","displayNoNewLineWarning":false,"position":32,"left":501,"right":509},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":510,"text":"+ array(","html":"+ \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":33,"left":501,"right":510},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":511,"text":"+ \u003c\u003c\u003cYAML","html":"+ \u003cspan class=pl-s\u003e\u0026lt;\u0026lt;\u0026lt;YAML\u003cspan class=pl-s\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":34,"left":501,"right":511},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":512,"text":"+foo: !php/object:O:30:\"Symfony\\Component\\Yaml\\Tests\\B\":1:{s:1:\"b\";s:3:\"foo\";}","html":"+\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003efoo: !php/object:O:30:\u0026quot;Symfony\\Component\\Yaml\\Tests\\B\u0026quot;:1:{s:1:\u0026quot;b\u0026quot;;s:3:\u0026quot;foo\u0026quot;;}\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":35,"left":501,"right":512},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":513,"text":"+bar: 1","html":"+\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003ebar: 1\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":36,"left":501,"right":513},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":514,"text":"+YAML","html":"+\u003cspan class=pl-s\u003eYAML\u003c/span\u003e","displayNoNewLineWarning":false,"position":37,"left":501,"right":514},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":515,"text":"+ ),","html":"+ ),","displayNoNewLineWarning":false,"position":38,"left":501,"right":515},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":516,"text":"+ );","html":"+ );","displayNoNewLineWarning":false,"position":39,"left":501,"right":516},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":517,"text":" }","html":" }","displayNoNewLineWarning":false,"position":40,"left":502,"right":517},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":518,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":41,"left":503,"right":518},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":519,"text":" /**","html":" \u003cspan class=pl-c\u003e/**\u003c/span\u003e","displayNoNewLineWarning":false,"position":42,"left":504,"right":519},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1827,"text":"@@ -1813,6 +1828,35 @@ public function testParserCleansUpReferencesBetweenRuns()","html":"@@ -1813,6 +1828,35 @@ public function testParserCleansUpReferencesBetweenRuns()","displayNoNewLineWarning":false,"position":43,"left":1812,"right":1827},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1828,"text":" public function testPhpConstantTagMappingKey()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestPhpConstantTagMappingKey\u003c/span\u003e()","displayNoNewLineWarning":false,"position":44,"left":1813,"right":1828},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1829,"text":" {","html":" {","displayNoNewLineWarning":false,"position":45,"left":1814,"right":1829},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1830,"text":" $yaml = \u003c\u003c\u003cYAML","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eyaml\u003c/span\u003e = \u003cspan class=pl-s\u003e\u0026lt;\u0026lt;\u0026lt;YAML\u003cspan class=pl-s\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":46,"left":1815,"right":1830},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1831,"text":"+transitions:","html":"+\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003etransitions:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":47,"left":1815,"right":1831},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1832,"text":"+ !php/const 'Symfony\\Component\\Yaml\\Tests\\B::FOO':","html":"+\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e !php/const \u0026#39;Symfony\\Component\\Yaml\\Tests\\B::FOO\u0026#39;:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":48,"left":1815,"right":1832},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1833,"text":"+ from:","html":"+\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e from:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":49,"left":1815,"right":1833},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1834,"text":"+ - !php/const 'Symfony\\Component\\Yaml\\Tests\\B::BAR'","html":"+\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e - !php/const \u0026#39;Symfony\\Component\\Yaml\\Tests\\B::BAR\u0026#39;\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":50,"left":1815,"right":1834},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1835,"text":"+ to: !php/const 'Symfony\\Component\\Yaml\\Tests\\B::BAZ'","html":"+\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e to: !php/const \u0026#39;Symfony\\Component\\Yaml\\Tests\\B::BAZ\u0026#39;\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":51,"left":1815,"right":1835},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1836,"text":"+YAML;","html":"+\u003cspan class=pl-s\u003eYAML\u003c/span\u003e;","displayNoNewLineWarning":false,"position":52,"left":1815,"right":1836},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1837,"text":"+ $expected = array(","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eexpected\u003c/span\u003e = \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":53,"left":1815,"right":1837},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1838,"text":"+ 'transitions' =\u003e array(","html":"+ \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003etransitions\u003c/span\u003e\u0026#39;\u003c/sp 8000 an\u003e =\u0026gt; \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":54,"left":1815,"right":1838},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1839,"text":"+ 'foo' =\u003e array(","html":"+ \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003efoo\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":55,"left":1815,"right":1839},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1840,"text":"+ 'from' =\u003e array(","html":"+ \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003efrom\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":56,"left":1815,"right":1840},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1841,"text":"+ 'bar',","html":"+ \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ebar\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":57,"left":1815,"right":1841},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1842,"text":"+ ),","html":"+ ),","displayNoNewLineWarning":false,"position":58,"left":1815,"right":1842},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1843,"text":"+ 'to' =\u003e 'baz',","html":"+ \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eto\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ebaz\u003c/span\u003e\u0026#39;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":59,"left":1815,"right":1843},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1844,"text":"+ ),","html":"+ ),","displayNoNewLineWarning":false,"position":60,"left":1815,"right":1844},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1845,"text":"+ ),","html":"+ ),","displayNoNewLineWarning":false,"position":61,"left":1815,"right":1845},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1846,"text":"+ );","html":"+ );","displayNoNewLineWarning":false,"position":62,"left":1815,"right":1846},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1847,"text":"+","html":"+","displayNoNewLineWarning":false,"position":63,"left":1815,"right":1847},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1848,"text":"+ $this-\u003eassertSame($expected, $this-\u003eparser-\u003eparse($yaml, Yaml::PARSE_CONSTANT));","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eassertSame\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eexpected\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eparser\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003eparse\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eyaml\u003c/span\u003e, Yaml::\u003cspan class=pl-c1\u003ePARSE_CONSTANT\u003c/span\u003e));","displayNoNewLineWarning":false,"position":64,"left":1815,"right":1848},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1849,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":65,"left":1815,"right":1849},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1850,"text":"+","html":"+","displayNoNewLineWarning":false,"position":66,"left":1815,"right":1850},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1851,"text":"+ /**","html":"+ \u003cspan class=pl-c\u003e/**\u003c/span\u003e","displayNoNewLineWarning":false,"position":67,"left":1815,"right":1851},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1852,"text":"+ * @group legacy","html":"+\u003cspan class=pl-c\u003e * @group legacy\u003c/span\u003e","displayNoNewLineWarning":false,"position":68,"left":1815,"right":1852},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1853,"text":"+ * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.","html":"+\u003cspan class=pl-c\u003e * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.\u003c/span\u003e","displayNoNewLineWarning":false,"position":69,"left":1815,"right":1853},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1854,"text":"+ * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.","html":"+\u003cspan class=pl-c\u003e * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.\u003c/span\u003e","displayNoNewLineWarning":false,"position":70,"left":1815,"right":1854},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1855,"text":"+ * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.","html":"+\u003cspan class=pl-c\u003e * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.\u003c/span\u003e","displayNoNewLineWarning":false,"position":71,"left":1815,"right":1855},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1856,"text":"+ */","html":"+\u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":72,"left":1815,"right":1856},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1857,"text":"+ public function testDeprecatedPhpConstantTagMappingKey()","html":"+ \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestDeprecatedPhpConstantTagMappingKey\u003c/span\u003e()","displayNoNewLineWarning":false,"position":73,"left":1815,"right":1857},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1858,"text":"+ {","html":"+ {","displayNoNewLineWarning":false,"position":74,"left":1815,"right":1858},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1859,"text":"+ $yaml = \u003c\u003c\u003cYAML","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eyaml\u003c/span\u003e = \u003cspan class=pl-s\u003e\u0026lt;\u0026lt;\u0026lt;YAML\u003cspan class=pl-s\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":75,"left":1815,"right":1859},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1860,"text":" transitions:","html":" \u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003etransitions:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":76,"left":1816,"right":1860},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1861,"text":" !php/const:Symfony\\Component\\Yaml\\Tests\\B::FOO:","html":" \u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e !php/const:Symfony\\Component\\Yaml\\Tests\\B::FOO:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":77,"left":1817,"right":1861},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1862,"text":" from:","html":" \u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e from:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":78,"left":1818,"right":1862},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1884,"text":"@@ -1841,10 +1885,10 @@ public function testPhpConstantTagMappingKeyWithKeysCastToStrings()","html":"@@ -1841,10 +1885,10 @@ public function testPhpConstantTagMappingKeyWithKeysCastToStrings()","displayNoNewLineWarning":false,"position":79,"left":1840,"right":1884},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1885,"text":" {","html":" {","displayNoNewLineWarning":false,"position":80,"left":1841,"right":1885},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1886,"text":" $yaml = \u003c\u003c\u003cYAML","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eyaml\u003c/span\u003e = \u003cspan class=pl-s\u003e\u0026lt;\u0026lt;\u0026lt;YAML\u003cspan class=pl-s\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":81,"left":1842,"right":1886},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1887,"text":" transitions:","html":" \u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003etransitions:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":82,"left":1843,"right":1887},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1844,"text":"- !php/const:Symfony\\Component\\Yaml\\Tests\\B::FOO:","html":"-\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e !php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eSymfony\\Component\\Yaml\\Tests\\B::FOO:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":83,"left":1844,"right":1887},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1888,"text":"+ !php/const 'Symfony\\Component\\Yaml\\Tests\\B::FOO':","html":"+\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e !php/const\u003cspan class=\"x x-first x-last\"\u003e '\u003c/span\u003eSymfony\\Component\\Yaml\\Tests\\B::FOO\u003cspan class=\"x x-first x-last\"\u003e'\u003c/span\u003e:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":84,"left":1844,"right":1888},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1889,"text":" from:","html":" \u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e\u003cspan class=pl-s\u003e from:\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":85,"left":1845,"right":1889},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1846,"text":"- - !php/const:Symfony\\Component\\Yaml\\Tests\\B::BAR","html":"-\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e - !php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eSymfony\\Component\\Yaml\\Tests\\B::BAR\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":86,"left":1846,"right":1889},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1847,"text":"- to: !php/const:Symfony\\Component\\Yaml\\Tests\\B::BAZ","html":"-\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e to: !php/const\u003cspan class=\"x x-first x-last\"\u003e:\u003c/span\u003eSymfony\\Component\\Yaml\\Tests\\B::BAZ\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":87,"left":1847,"right":1889},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1890,"text":"+ - !php/const 'Symfony\\Component\\Yaml\\Tests\\B::BAR'","html":"+\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e - !php/const\u003cspan class=\"x x-first x-last\"\u003e '\u003c/span\u003eSymfony\\Component\\Yaml\\Tests\\B::BAR\u003cspan class=\"x x-first x-last\"\u003e'\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":88,"left":1847,"right":1890},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1891,"text":"+ to: !php/const 'Symfony\\Component\\Yaml\\Tests\\B::BAZ'","html":"+\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-s\"\u003e to: !php/const\u003cspan class=\"x x-first x-last\"\u003e '\u003c/span\u003eSymfony\\Component\\Yaml\\Tests\\B::BAZ\u003cspan class=\"x x-first x-last\"\u003e'\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":89,"left":1847,"right":1891},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1892,"text":" YAML;","html":" \u003cspan class=pl-s\u003eYAML\u003c/span\u003e;","displayNoNewLineWarning":false,"position":90,"left":1848,"right":1892},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1893,"text":" $expected = array(","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eexpected\u003c/span\u003e = \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":91,"left":1849,"right":1893},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1894,"text":" 'transitions' =\u003e array(","html":" \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003etransitions\u003c/span\u003e\u0026#39;\u003c/span\u003e =\u0026gt; \u003cspan class=pl-en\u003earray\u003c/span\u003e(","displayNoNewLineWarning":false,"position":92,"left":1850,"right":1894}],"diffNumber":6,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1915,"linesChanged":60,"newTreeEntry":{"lineCount":1915,"path":"Tests/ParserTest.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Tests/ParserTest.php","mode":100644},"linesAdded":52,"linesDeleted":8,"path":"Tests/ParserTest.php","pathDigest":"b6c7900cc1bda0dfefb93472ed7cd65006a357429d4c7ff39773a51a5e38a660","status":"MODIFIED","truncatedReason":null,"oldOid":"99f52b149bfb50ed118162305ffa4e9765cc025f","newOid":"1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","copilotChatReference":null,"deletedSha":"99f52b149bfb50ed118162305ffa4e9765cc025f","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null}],"splitViewPreference":"unified","ignoreWhitespace":false,"commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/symfony/yaml/commit/1395ddba6f65bf46cdf1d80d59223cbab8ff3ccc","fileTreeExpanded":true,"headerInfo":{"additions":107,"deletions":21,"filesChanged":7,"filesChangedString":"7"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":7,"truncated":false,"byteCount":12974,"lineShownCount":255},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"dTo8GLKWKtjPyjMiy54P_miNa1GBx0i7w4xSCadcDY4k89U6pr9IfzIADpaTzWQdn45sKEXLfKmX5_gt1xl1vw"},"/users/diffview?diff=unified":{"post":"N0SBMWKsp3NlVXbjd3blBfotk4BD7vBF6JktvM5uEGlmjWgTdoXF1JifS1cvJY7mDS6U-YfixFe88oeYvitoWA"},"/notifications/thread":{"post":"1cQq2WXJsPDfD2Mo87w8R1qCw7Xwq6gzk7brYT9M0KVhfmT53_8MRZfLlcSJcLgFAMj1EYE7nNd3BBgzwbYrzw"}}},"title":"minor #22913 [Yaml] Deprecate tags using colon (GuilhemN) · symfony/yaml@1395ddb","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-6dcb06aa9fad.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false}}}

Commit 1395ddb

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 99f52b1 + 38d3087 commit 1395ddb

File tree

7 files changed

+107
-21
lines changed

7 files changed

+107
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ CHANGELOG
44
3.4.0
55
-----
66

7+
* Deprecated the `!php/object:` tag which will be replaced by the
8+
`!php/object` tag (without the colon) in 4.0.
9+
10+
* Deprecated the `!php/const:` tag which will be replaced by the
11+
`!php/const` tag (without the colon) in 4.0.
12+
713
* Support for the `!str` tag is deprecated, use the `!!str` tag instead.
814

915
* Deprecated using the non-specific tag `!` as its behavior will change in 4.0.

Inline.php

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public static function dump($value, $flags = 0)
170170
}
171171

172172
if (Yaml::DUMP_OBJECT & $flags) {
173-
return '!php/object:'.serialize($value);
173+
return '!php/object '.self::dump(serialize($value));
174174
}
175175

176176
if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) {
@@ -620,6 +620,8 @@ private static function evaluateScalar($scalar, $flags, $references = array())
620620
return (int) self::parseScalar(substr($scalar, 2), $flags);
621621
case 0 === strpos($scalar, '!php/object:'):
622622
if (self::$objectSupport) {
623+
@trigger_error('The !php/object: tag to indicate dumped PHP objects is deprecated since version 3.4 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.', E_USER_DEPRECATED);
624+
623625
return unserialize(substr($scalar, 12));
624626
}
625627

@@ -630,7 +632,7 @ 8000 @ private static function evaluateScalar($scalar, $flags, $references = array())
630632
return;
631633
case 0 === strpos($scalar, '!!php/object:'):
632634
if (self::$objectSupport) {
633-
@trigger_error('The !!php/object tag to indicate dumped PHP objects is deprecated since version 3.1 and will be removed in 4.0. Use the !php/object tag instead.', E_USER_DEPRECATED);
635+
@trigger_error('The !!php/object: tag to indicate dumped PHP objects is deprecated since version 3.1 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.', E_USER_DEPRECATED);
634636

635637
return unserialize(substr($scalar, 13));
636638
}
@@ -639,9 +641,21 @@ private static function evaluateScalar($scalar, $flags, $references = array())
639641
throw new ParseException('Object support when parsing a YAML file has been disabled.');
640642
}
641643

644+
return;
645+
case 0 === strpos($scalar, '!php/object'):
646+
if (self::$objectSupport) {
647+
return unserialize(self::parseScalar(substr($scalar, 12)));
648+
}
649+
650+
if (self::$exceptionOnInvalidType) {
651+
throw new ParseException('Object support when parsing a YAML file has been disabled.');
652+
}
653+
642654
return;
643655
case 0 === strpos($scalar, '!php/const:'):
644656
if (self::$constantSupport) {
657+
@trigger_error('The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.', E_USER_DEPRECATED);
658+
645659
if (defined($const = substr($scalar, 11))) {
646660
return constant($const);
647661
}
@@ -652,6 +666,19 @@ private static function evaluateScalar($scalar, $flags, $references = array())
652666
throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar));
653667
}
654668

669+
return;
670+
case 0 === strpos($scalar, '!php/const'):
671+
if (self::$constantSupport) {
672+
if (defined($const = self::parseScalar(substr($scalar, 11)))) {
673+
return constant($const);
674+
}
675+
676+
throw new ParseException(sprintf('The constant "%s" is not defined.', $const));
677+
}
678+
if (self::$exceptionOnInvalidType) {
679+
throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar));
680+
}
681+
655682
return;
656683
case 0 === strpos($scalar, '!!float '):
657684
return (float) substr($scalar, 8);

Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private function doParse($value, $flags)
212212
$this->refs[$isRef] = end($data);
213213
}
214214
} elseif (
215-
self::preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?(?:![^\s]++\s++)?[^ \'"\[\{!].*?) *\:(\s++(?P<value>.+))?$#u', rtrim($this->currentLine), $values)
215+
self::preg_match('#^(?P<key>(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(\s++(?P<value>.+))?$#u', rtrim($this->currentLine), $values)
216216
&& (false === strpos($values['key'], ' #') || in_array($values['key'][0], array('"', "'")))
217217
) {
218218
if ($context && 'sequence' == $context) {

Tests/Command/LintCommandTest.php

Lines changed: 1 a F438 ddition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testLintIncorrectFile()
5454
public function testConstantAsKey()
5555
{
5656
$yaml = <<<YAML
57-
!php/const:Symfony\Component\Yaml\Tests\Command\Foo::TEST: bar
57+
!php/const 'Symfony\Component\Yaml\Tests\Command\Foo::TEST': bar
5858
YAML;
5959
$ret = $this->createCommandTester()->execute(array('filename' => $this->createFile($yaml)), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false));
6060
$this->assertSame(0, $ret, 'lint:yaml exits with code 0 in case of success');

Tests/DumperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function testObjectSupportEnabled()
210210
{
211211
$dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_OBJECT);
212212

213-
$this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects');
213+
$this->assertEquals('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }', $dump, '->dump() is able to dump objects');
214214
}
215215

216216
/**
@@ -220,7 +220,7 @@ public function testObjectSupportEnabledPassingTrue()
220220
{
221221
$dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true);
222222

223-
$this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects');
223+
$this->assertEquals('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }', $dump, '->dump() is able to dump objects');
224224
}
225225

226226
public function testObjectSupportDisabledButNoExceptions()

Tests/InlineTest.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ public function testParsePhpConstants($yaml, $value)
4949
public function getTestsForParsePhpConstants()
5050
{
5151
return array(
52-
array('!php/const:Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT),
53-
array('!php/const:PHP_INT_MAX', PHP_INT_MAX),
54-
array('[!php/const:PHP_INT_MAX]', array(PHP_INT_MAX)),
55-
array('{ foo: !php/const:PHP_INT_MAX }', array('foo' => PHP_INT_MAX)),
52+
array('!php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT),
53+
array('!php/const PHP_INT_MAX', PHP_INT_MAX),
54+
array('[!php/const PHP_INT_MAX]', array(PHP_INT_MAX)),
55+
array('{ foo: !php/const PHP_INT_MAX }', array('foo' => PHP_INT_MAX)),
5656
);
5757
}
5858

@@ -62,16 +62,25 @@ public function getTestsForParsePhpConstants()
6262
*/
6363
public function testParsePhpConstantThrowsExceptionWhenUndefined()
6464
{
65-
Inline::parse('!php/const:WRONG_CONSTANT', Yaml::PARSE_CONSTANT);
65+
Inline::parse('!php/const WRONG_CONSTANT', Yaml::PARSE_CONSTANT);
6666
}
6767

6868
/**
6969
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
70-
* @expectedExceptionMessageRegExp #The string "!php/const:PHP_INT_MAX" could not be parsed as a constant.*#
70+
* @expectedExceptionMessageRegExp #The string "!php/const PHP_INT_MAX" could not be parsed as a constant.*#
7171
*/
7272
public function testParsePhpConstantThrowsExceptionOnInvalidType()
7373
{
74-
Inline::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);
74+
Inline::parse('!php/const PHP_INT_MAX', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);
75+
}
76+
77+
/**
78+
* @group legacy
79+
* @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.
80+
*/
81+
public function testDeprecatedConstantTag()
82+
{
83+
Inline::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_CONSTANT);
7584
}
7685

7786
/**

Tests/ParserTest.php

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
471471
public function testObjectSupportEnabled()
472472
{
473473
$input = <<<'EOF'
474-
foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";}
474+
foo: !php/object O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";}
475475
bar: 1
476476
EOF;
477477
$this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, Yaml::PARSE_OBJECT), '->parse() is able to parse objects');
@@ -491,14 +491,29 @@ public function testObjectSupportEnabledPassingTrue()
491491

492492
/**
493493
* @group legacy
494+
* @dataProvider deprecatedObjectValueProvider
494495
*/
495-
public function testObjectSupportEnabledWithDeprecatedTag()
496+
public function testObjectSupportEnabledWithDeprecatedTag($yaml)
496497
{
497-
$input = <<<'EOF'
498+
$this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($yaml, Yaml::PARSE_OBJECT), '->parse() is able to parse objects');
499+
}
500+
501+
public function deprecatedObjectValueProvider()
502+
{
503+
return array(
504+
array(
505+
<<<YAML
498506
foo: !!php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";}
499507
bar: 1
500-
EOF;
501-
$this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, Yaml::PARSE_OBJECT), '->parse() is able to parse objects');
508+
YAML
509+
),
510+
array(
511+
<<<YAML
512+
foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";}
513+
bar: 1
514+
YAML
515+
),
516+
);
502517
}
503518

504519
/**
@@ -1813,6 +1828,35 @@ public function testParserCleansUpReferencesBetweenRuns()
18131828
public function testPhpConstantTagMappingKey()
18141829
{
18151830
$yaml = <<<YAML
1831+
transitions:
1832+
!php/const 'Symfony\Component\Yaml\Tests\B::FOO':
1833+
from:
1834+
- !php/const 'Symfony\Component\Yaml\Tests\B::BAR'
1835+
to: !php/const 'Symfony\Component\Yaml\Tests\B::BAZ'
1836+
YAML;
1837+
$expected = array(
1838+
'transitions' => array(
1839+
'foo' => array(
1840+
'from' => array(
1841+
'bar',
1842+
),
1843+
'to' => 'baz',
1844+
),
1845+
),
1846+
);
1847+
1848+
$this->assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT));
1849+
}
1850+
1851+
/**
1852+
* @group legacy
1853+
* @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.
1854+
* @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.
1855+
* @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since version 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.
1856+
*/
1857+
public function testDeprecatedPhpConstantTagMappingKey()
1858+
{
1859+
$yaml = <<<YAML
18161860
transitions:
18171861
!php/const:Symfony\Component\Yaml\Tests\B::FOO:
18181862
from:
@@ -1841,10 +1885,10 @@ public function testPhpConstantTagMappingKeyWithKeysCastToStrings()
18411885
{
18421886
$yaml = <<<YAML
18431887
transitions:
1844-
!php/const:Symfony\Component\Yaml\Tests\B::FOO:
1888+
!php/const 'Symfony\Component\Yaml\Tests\B::FOO':
18451889
from:
1846-
- !php/const:Symfony\Component\Yaml\Tests\B::BAR
1847-
to: !php/const:Symfony\Component\Yaml\Tests\B::BAZ
1890+
- !php/const 'Symfony\Component\Yaml\Tests\B::BAR'
1891+
to: !php/const 'Symfony\Component\Yaml\Tests\B::BAZ'
18481892
YAML;
18491893
$expected = array(
18501894
'transitions' => array(

0 commit comments

Comments
 (0)
0