Happyr / TranslationBundle

[DEPRECATED] A bundle to integrate with third party translation platforms
MIT License
50 stars 22 forks source link

[FIX] Symfony vardumper passes objects instead of array typehint #51

Closed samvdb closed 7 years ago

samvdb commented 7 years ago

Symfony Vardumper component is used in the translation datacollector. This produces messages of type "Stub" or "Data", passing them to the constructor of the Message model which expects an array will throw fatal exception.

Error was discovered using Sylius 1.0-beta2 using Symfony 3.3.

Relevant lines: vendor/happyr/translation-bundle/src/Controller/ProfilerController.php:185

Origin of error:

Profiler->flag message -> vendor/happyr/translation-bundle/src/Controller/ProfilerController.php:71

Nyholm commented 7 years ago

Wasn't this fixed by https://github.com/Happyr/TranslationBundle/pull/50?

samvdb commented 7 years ago

No, these changes are needed in the getMessage function. The solution proposed in #50 are valid for this problem, this is just less code.

Nyholm commented 7 years ago

Is $data still arrayAccessable in SF.3.3?

samvdb commented 7 years ago

Yes,

I am using sf3.3 with this fix.

Nyholm commented 7 years ago

Thank you Sam.