diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index db8891b..2ff7331 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,7 +11,7 @@ permissions: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6026d80..9c039e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.1.1 + +- Add native `array` return types to `Lexer::getCatchablePatterns()` and `Lexer::getNonCatchablePatterns()`, which silences Symfony's `DebugClassLoader` deprecations [#11](https://github.com/mapado/request-fields-parser/pull/11) by [@nikophil](https://github.com/nikophil) + ## 3.1.0 - Add `Parser::reverseParse()` doing the opposite of `Parser::parse()` [#10](https://github.com/mapado/request-fields-parser/pull/10) by [@nickinthebox](https://github.com/nickinthebox) diff --git a/src/Lexer.php b/src/Lexer.php index 87ac182..1193bcc 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -14,18 +14,12 @@ class Lexer extends DoctrineLexer const T_OBJECT_START = 3; const T_OBJECT_END = 4; - /** - * {@inheritdoc} - */ - protected function getCatchablePatterns() + protected function getCatchablePatterns(): array { return ['[^,\{\}]+', ',', '{', '}']; } - /** - * {@inheritdoc} - */ - protected function getNonCatchablePatterns() + protected function getNonCatchablePatterns(): array { return ['\s+']; }