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

Skip to content

Support "!!binary" syntax (decodes base64 string). #15958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 28, 2015

This PR was submitted on the symfony/yaml read-only repository by @johnnytemp and moved automatically to the main Symfony repository (closes symfony/yaml#13).

Only supported in folded-scalar (lines ending with | or >) form, or inline form.

Example Yaml:
items

name_enc: !!binary "SGVsbG8sIHdvcmxkLg=="
desc_enc: !!binary |
    SGVsbG8sIH
    dvcmxkLg==

Only supported in folded-scalar (lines ending with | or >) form, or inline form.
$modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : '';

return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs($modifiers));
$output = $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs($modifiers));
if (isset($matches['tag']) && $matches['tag'] == '!!binary')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing curly braces

@stof
Copy link
Member

stof commented Sep 28, 2015

Tests covering this case are missing.

Status: needs work

@fabpot
Copy link
Member Author

fabpot commented Jan 25, 2016

@johnnytemp Can you finish this one?

@johnnytemp
Copy link

@fabpot I am not familiar with the project. Tried, and find it hard to master the test tools. So, sorry, I won't do it currently.

@xabbuh
Copy link
Member

xabbuh commented Jan 28, 2016

@johnnytemp Thanks for the feedback. I'll finish this for you then.

@johnnytemp
Copy link

@xabbuh I have successfully triggered unit test and added unit test. I issued another pull request for this as #17599 to replace this. Thank you.

@fabpot
Copy link
Member Author

fabpot commented Jan 29, 2016

Closing in favor of #17599

@fabpot fabpot closed this Jan 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants