Compare commits

..

No commits in common. "main" and "1.0.0" have entirely different histories.
main ... 1.0.0

4 changed files with 26 additions and 44 deletions

View file

@ -1,4 +1,4 @@
steps: pipeline:
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
steps: pipeline:
functional-tests: functional-tests:
image: "thecodingmachine/php:${PHP_VERSION}-v4-cli" image: "thecodingmachine/php:${PHP_VERSION}-v4-cli"
environment: environment:

View file

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

View file

@ -2,33 +2,10 @@
"name": "digicomp/flow-translation-endpoint", "name": "digicomp/flow-translation-endpoint",
"description": "A simple endpoint providing XLIFF translations as string", "description": "A simple endpoint providing XLIFF translations as string",
"type": "neos-package", "type": "neos-package",
"keywords": [
"Neos",
"Flow",
"translation",
"xliff",
"json"
],
"homepage": "https://git.digital-competence.de/Packages/DigiComp.FlowTranslationEndpoint",
"license": "MIT",
"authors": [
{
"name": "Ferdinand Kuhl",
"email": "f.kuhl@digital-competence.de",
"homepage": "https://www.digital-competence.de",
"role": "Developer"
}
],
"require": { "require": {
"php": ">=7.4.0",
"ext-json": "*", "ext-json": "*",
"neos/flow": "^6.3.0 || ^7.0 || ^8.0" "neos/flow": "^6.3.0 | ^7.0 | ^8.0",
}, "php": ">=7.4"
"require-dev": {
"mikey179/vfsstream": "^1.6.1",
"neos/buildessentials": "^7.0.0",
"phpunit/phpunit": "~8.5",
"vimeo/psalm": "~4.22.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -40,16 +17,29 @@
"DigiComp\\FlowTranslationEndpoint\\Tests\\": "Tests/" "DigiComp\\FlowTranslationEndpoint\\Tests\\": "Tests/"
} }
}, },
"config": {
"sort-packages": true,
"platform-check": true
},
"extra": { "extra": {
"branch-alias": {
"dev-develop": "1.0.x-dev"
},
"neos": { "neos": {
"package-key": "DigiComp.FlowTranslationEndpoint" "package-key": "DigiComp.FlowTranslationEndpoint"
},
"branch-alias": {
"dev-develop": "1.0.x-dev"
} }
},
"authors": [
{
"name": "Ferdinand Kuhl",
"email": "f.kuhl@digital-competence.de",
"homepage": "https://www.digital-competence.de",
"role": "Developer"
} }
],
"license": "MIT",
"homepage": "https://git.digital-competence.de/Packages/DigiComp.FlowTranslationEndpoint",
"keywords": [
"Neos",
"Flow",
"translation",
"xliff",
"json"
]
} }