8000 [TASK] Deprecate ParserState::comsumeWhitespace (#670) · MyIntervals/PHP-CSS-Parser@d53d9ba · GitHub
Skip to content

Commit d53d9ba

Browse files
committed
[TASK] Deprecate ParserState::comsumeWhitespace (#670)
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
1 parent 0fa736a commit d53d9ba

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1515

1616
### Deprecated
1717

18+
- Deprecate `ParserState::consumeWhiteSpace()` in favor of `ParserState::consumeWhiteSpaceWithComments()` (#670)
19+
1820
### Removed
1921

2022
### Fixed

src/Parsing/ParserState.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,14 @@ public function parseCharacter($bIsForIdentifier)
232232
*
233233
* @throws UnexpectedEOFException
234234
* @throws UnexpectedTokenException
235+
*
236+
* @deprecated From version 9.0.0 onwards this method will be undergo a breaking
237+
* change. This method will no longer consume comments, only whitespace.
238+
* Use `ParserState::consumeWhiteSpaceWithComments` as a replacement if you
239+
* need the former behaviour of consuming whitespace and comments.
240+
*
241+
* @see `ParserState::consumeWhiteSpaceWithComments` for a version that also
242+
* returns comments.
235243
*/
236244
public function consumeWhiteSpace()
237245
{

0 commit comments

Comments
 (0)