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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The backward compatibility promise has the following exceptions:
* Units of code that are annotated with `@internal`.

## [Unreleased]
### Fixed
- Handle quoted YAML, added in beanstalkd v1.13

## [3.1.1] - 2025-07-31
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/Command/StatsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private function decode(string $response): array
} else {
$key = strtok($line, ': ');
if ($key) {
$value = ltrim(trim(strtok('')), ' ');
$value = trim(trim(strtok('')), '"');

if (is_numeric($value)) {
$value += 0;
Expand Down
7 changes: 7 additions & 0 deletions tests/Command/StatsTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ public function yamlFormatIsDecodedDataProvider(): array
'key3' => 'value3',
],
],
'quotedValues' => [
"key1: \"value1\"\r\nkey2: value2",
[
'key1' => 'value1',
'key2' => 'value2',
],
],
];
}

Expand Down
Loading