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: code-style:
image: composer image: composer
commands: commands:

View file

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

View file

@ -157,7 +157,15 @@ class TranslationRequestMiddleware implements MiddlewareInterface
\ARRAY_FILTER_USE_KEY \ARRAY_FILTER_USE_KEY
); );
$result[$package] += \array_map( $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 $matchingUnits
); );
} }