Merge branch 'release/1.0.1'
All checks were successful
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests Pipeline was successful

This commit is contained in:
Marvin Kuhl 2023-09-29 17:34:04 +02:00
commit 775d597058
3 changed files with 11 additions and 3 deletions

View file

@ -1,4 +1,4 @@
pipeline:
steps:
code-style:
image: composer
commands:

View file

@ -13,7 +13,7 @@ matrix:
- FLOW_VERSION: 8.3
PHP_VERSION: 8.1
pipeline:
steps:
functional-tests:
image: "thecodingmachine/php:${PHP_VERSION}-v4-cli"
environment:

View file

@ -157,7 +157,15 @@ class TranslationRequestMiddleware implements MiddlewareInterface
\ARRAY_FILTER_USE_KEY
);
$result[$package] += \array_map(
static fn($value) => $value[0]['target'],
static function ($value) {
if (\count($value) === 1) {
return $value[0]['target'];
}
return \array_map(
static fn ($value) => $value['target'],
$value
);
},
$matchingUnits
);
}