rompetomp / inertia-bundle

Inertia.js server-side adapter for Symfony
MIT License
152 stars 37 forks source link

Shared properties #4

Closed innocenzi closed 5 years ago

innocenzi commented 5 years ago

Hi, I'm quite confused about shared properties in this bundle. They seem to not be added in the response?

https://github.com/rompetomp/inertia-bundle/blob/e95c179d9506300984add4ddd8abcde901a2d4d0/Service/Inertia.php#L66-L95

I think adding $props = array_merge($this->sharedProps, $props); at the start of the function would handle it correctly.

rompetomp commented 5 years ago

Thanks for the report @hawezo. You were correct. I forgot to add the sharedProps to the render function. I added tests to look over this issue aswell