Skip to content

Commit

Permalink
[TASK] Deprecate ParserState::comsumeWhitespace (MyIntervals#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 62dddaf commit b92f7c3
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::comsumeWhitespace()` in favor of `ParserState::comsumeWhitespaceWithComments()` (#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::comsumeWhitespaceWithComments` as a replacement if you
* need the former behaviour of consuming whitespace and comments.
*
* @see `ParserState::comsumeWhitespaceWithComments` for a version that also
* returns comments.
*/
public function comsumeWhitespace(): array
{
Expand Down

0 comments on commit b92f7c3

Please sign in to comment.