Closed
Description
Symfony version(s) affected
5.3.6
Description
Given:
- non-empty Loco project.
- multiple translation domains
When pushing multiple domains to Loco, exception is thrown:
php bin\console translation:push loco --domains forms --domains messages --domains validators --force
12:31:09 INFO [http_client] Request: "POST https://localise.biz/api/assets"
12:31:09 INFO [http_client] Request: "POST https://localise.biz/api/assets"
12:31:09 INFO [http_client] Request: "POST https://localise.biz/api/assets"
12:31:09 INFO [http_client] Request: "POST https://localise.biz/api/assets"
12:31:10 INFO [http_client] Response: "201 https://localise.biz/api/assets"
12:31:10 INFO [http_client] Response: "201 https://localise.biz/api/assets"
12:31:10 INFO [http_client] Response: "201 https://localise.biz/api/assets"
12:31:10 INFO [http_client] Response: "201 https://localise.biz/api/assets"
12:31:10 INFO [http_client] Request: "GET https://localise.biz/api/tags.json"
12:31:11 INFO [http_client] Response: "200 https://localise.biz/api/tags.json"
12:31:11 INFO [http_client] Request: "POST https://localise.biz/api/tags/forms.json"
12:31:11 INFO [http_client] Response: "200 https://localise.biz/api/tags/forms.json"
12:31:11 INFO [http_client] Request: "GET https://localise.biz/api/locales"
12:31:11 INFO [http_client] Response: "200 https://localise.biz/api/locales"
12:31:11 INFO [http_client] Request: "GET https://localise.biz/api/assets?filter=forms"
12:31:11 INFO [http_client] Response: "200 https://localise.biz/api/assets?filter=forms"
In LocoProvider.php line 78:
[ValueError]
array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements
Exception trace:
at C:\work\jtmweb\vendor\symfony\loco-translation-provider\LocoProvider.php:78
array_combine() at C:\work\jtmweb\vendor\symfony\loco-translation-provider\LocoProvider.php:78
Symfony\Component\Translation\Bridge\Loco\LocoProvider->write() at C:\work\jtmweb\vendor\symfony\translation\Provider\FilteringProvider.php:47
Symfony\Component\Translation\Provider\FilteringProvider->write() at C:\work\jtmweb\vendor\symfony\translation\Command\TranslationPushCommand.php:116
Symfony\Component\Translation\Command\TranslationPushCommand->execute() at C:\work\jtmweb\vendor\symfony\console\Command\Command.php:299
Symfony\Component\Console\Command\Command->run() at C:\work\jtmweb\vendor\symfony\console\Application.php:996
Symfony\Component\Console\Application->doRunCommand() at C:\work\jtmweb\vendor\symfony\framework-bundle\Console\Application.php:96
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at C:\work\jtmweb\vendor\symfony\console\Application.php:295
Symfony\Component\Console\Application->doRun() at C:\work\jtmweb\vendor\symfony\framework-bundle\Console\Application.php:82
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at C:\work\jtmweb\vendor\symfony\console\Application.php:167
Symfony\Component\Console\Application->run() at C:\work\jtmweb\vendor\symfony\runtime\Runner\Symfony\ConsoleApplicationRunner.php:56
Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at C:\work\jtmweb\vendor\autoload_runtime.php:35
require_once() at C:\work\jtmweb\bin\console:11
translation:push [--force] [--delete-missing] [--domains [DOMAINS]] [--locales [LOCALES]] [--] [<provider>]
Process finished with exit code 255
How to reproduce
- Have empty Loco project.
- Run this command once:
php bin\console translation:push loco --domains forms --domains messages --domains validators --force
- Run same command again:
php bin\console translation:push loco --domains forms --domains messages --domains validators --force
Error occurs.
Possible Solution
No response
Additional Context
No response