Skip to content
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

[FEATURE] Add consumeWhitespaceWithComments and redirect consumeWhitespace (backported) #670

Open
wants to merge 2 commits into
base: v8.x
Choose a base branch
from

Conversation

ziegenberg
Copy link
Contributor

@ziegenberg ziegenberg commented Aug 25, 2024

Having consumeWhitespace also consumes comments, and returning them was unexpected. This also "deprecates" the consumeWhitespace method and announces a breaking change for 9.0.0.

ziegenberg added a commit to ziegenberg/PHP-CSS-Parser that referenced this pull request Aug 25, 2024
…space (MyIntervals#670)

Having comsumeWhitespace also consume comments and returning them was unexpected.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
ziegenberg added a commit to ziegenberg/PHP-CSS-Parser that referenced this pull request Aug 25, 2024
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
@ziegenberg ziegenberg force-pushed the add-comsume-whitespacewithcomment branch from a07190b to b92f7c3 Compare August 25, 2024 17:10
ziegenberg added a commit to ziegenberg/PHP-CSS-Parser that referenced this pull request Aug 25, 2024
…space (MyIntervals#670)

Having comsumeWhitespace also consume comments and returning them was unexpected.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
ziegenberg added a commit to ziegenberg/PHP-CSS-Parser that referenced this pull request Aug 25, 2024
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
@ziegenberg ziegenberg force-pushed the add-comsume-whitespacewithcomment branch from b92f7c3 to 79b271f Compare August 25, 2024 17:11
@ziegenberg ziegenberg changed the title [FEATURE] Add comsumeWhitespaceWithComments and redirect comsumeWhitespace [FEATURE] Add consumeWhitespaceWithComments and redirect consumeWhitespace Aug 25, 2024
…space (MyIntervals#670)

Having comsumeWhitespace also consume comments and returning them was unexpected.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
@ziegenberg ziegenberg force-pushed the add-comsume-whitespacewithcomment branch from 79b271f to d53d9ba Compare August 25, 2024 17:19
@ziegenberg ziegenberg changed the title [FEATURE] Add consumeWhitespaceWithComments and redirect consumeWhitespace [FEATURE] Add consumeWhitespaceWithComments and redirect consumeWhitespace (backported) Aug 25, 2024
Copy link
Contributor

@oliverklee oliverklee left a comment

Choose a reason for hiding this comment

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

Thanks! Could you also add a test for the new method? (Copying and modifying the test for the other method should be fine.)

src/Parsing/ParserState.php Show resolved Hide resolved
@ziegenberg
Copy link
Contributor Author

Thanks! Could you also add a test for the new method? (Copying and modifying the test for the other method should be fine.)

@ziegenberg ziegenberg closed this Aug 25, 2024
@ziegenberg ziegenberg deleted the add-comsume-whitespacewithcomment branch August 25, 2024 21:19
@ziegenberg ziegenberg restored the add-comsume-whitespacewithcomment branch August 25, 2024 21:19
@ziegenberg ziegenberg reopened this Aug 25, 2024
@ziegenberg
Copy link
Contributor Author

Sorry, clicked the wrong buttons...

@oliverklee
Copy link
Contributor

This should go into main first. Would you be willing to create a new PR targeting main? (If I switch the target of this PR, I fear that this would create a bunch of merge conflicts.)

@oliverklee
Copy link
Contributor

And (as far as I see) as this isn't necessary for the bugfix (please correct me if I'm wrong) and does not provide any user-/developer facing new feature, I'd prefer this to go into main only. Would you be okay with this, @ziegenberg?

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.

2 participants