Skip to content

Commit

Permalink
[TASK] Deprecate ParserState::comsumeWhitespace (#670)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
  • Loading branch information
ziegenberg committed Aug 25, 2024
1 parent 0fa736a commit d53d9ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Deprecated

- Deprecate `ParserState::consumeWhiteSpace()` in favor of `ParserState::consumeWhiteSpaceWithComments()` (#670)

### Removed

### Fixed
Expand Down
8 changes: 8 additions & 0 deletions src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ public function parseCharacter($bIsForIdentifier)
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @deprecated From version 9.0.0 onwards this method will be undergo a breaking
* change. This method will no longer consume comments, only whitespace.
* Use `ParserState::consumeWhiteSpaceWithComments` as a replacement if you
* need the former behaviour of consuming whitespace and comments.
*
* @see `ParserState::consumeWhiteSpaceWithComments` for a version that also
* returns comments.
*/
public function consumeWhiteSpace()
{
Expand Down

0 comments on commit d53d9ba

Please sign in to comment.