Skip to content

[TASK] Remove Parser::setCharset/getCharset #808

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

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Please also have a look at our

### Removed

- Remove `Parser::setCharset/getCharset` (#808)
- Remove `Rule::getValues()` (#582)
- Remove `Rule::setValues()` (#562)
- Remove `Document::getAllSelectors()` (#561)
Expand Down
23 changes: 0 additions & 23 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,6 @@ public function __construct($sText, ?Settings $oParserSettings = null, $iLineNo
$this->oParserState = new ParserState($sText, $oParserSettings, $iLineNo);
}

/**
* Sets the charset to be used if the CSS does not contain an `@charset` declaration.
*
* @param string $sCharset
*
* @deprecated since 8.7.0, will be removed in version 9.0.0 with #687
*/
public function setCharset($sCharset): void
{
$this->oParserState->setCharset($sCharset);
}

/**
* Returns the charset that is used if the CSS does not contain an `@charset` declaration.
*
* @deprecated since 8.7.0, will be removed in version 9.0.0 with #687
*/
public function getCharset(): void
{
// Note: The `return` statement is missing here. This is a bug that needs to be fixed.
$this->oParserState->getCharset();
}

/**
* Parses the CSS provided to the constructor and creates a `Document` from it.
*
Expand Down