Skip to content

Yaml source manipulator - fix access control #487

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

Merged

Conversation

weaverryan
Copy link
Member

This helps #460 by fixing a few bugs with YamlSourceManipulator. But, it doesn't yet allow for the access_control array structure to be printed in an inline format (#460 (comment)).

Cheers!

@weaverryan weaverryan added the Bug Bug Fix label Nov 3, 2019
Comment on lines +466 to +469
$isNextContentComment = $this->isPreviousLineComment($newPosition);
if ($isNextContentComment) {
$newPosition++;
}

Choose a reason for hiding this comment

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

Shouldn't it be a while in case of multi-line comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

The $newPosition++ here is just because of the code below that adds 1 new character (\n) if the next line is a comment. I'm moving this pointer/position forward 1 for that 1 \n. It's confusing code :). The test case actually does have 2 lines of comment.

@weaverryan weaverryan closed this in 7102b79 Dec 1, 2019
@weaverryan weaverryan merged commit aa6c358 into symfony:master Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants