Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
test:

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub retired the ubuntu-20.04 image in April 2025: the jobs of this PR stayed queued with no runner to pick them up


strategy:
matrix:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
10 changes: 2 additions & 8 deletions src/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neither doctrine/lexer 2 nor doctrine/lexer 3 declares a native return type on these abstract methods, so a child class can add one: the whole ^2.0 || ^3.0 range keeps working, and the CI matrix runs both

{
return ['[^,\{\}]+', ',', '{', '}'];
}

/**
* {@inheritdoc}
*/
protected function getNonCatchablePatterns()
protected function getNonCatchablePatterns(): array
{
return ['\s+'];
}
Expand Down
Loading