Skip to content

Commit 79b271f

Browse files
committed
[TASK] Deprecate ParserState::comsumeWhitespace (MyIntervals#670)
Signed-off-by: Daniel Ziegenberg <[email protected]>
1 parent 119b1d2 commit 79b271f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

+2
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::comsumeWhitespace()` in favor of `ParserState::comsumeWhitespaceWithComments()` (#670)
19+
1820
### Removed
1921

2022
### Fixed

src/Parsing/ParserState.php

+8
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::comsumeWhitespaceWithComments` as a replacement if you
239+
* need the former behaviour of consuming whitespace and comments.
240+
*
241+
* @see `ParserState::comsumeWhitespaceWithComments` for a version that also
242+
* returns comments.
235243
*/
236244
public function comsumeWhitespace()
237245
{

0 commit comments

Comments
 (0)