laravel-localization
laravel-localization copied to clipboard
Feat: WIP Laravel Octane support
- binding in service provider changed to a way proposed by Laravel Octane in case if we detect it
- introduced a listener to hook into Octane's RequestReceived event
Refs: #780
Let's start with that. I will test this on the staging platform of my live project.
My main point to consider is can we completely switch to bind()
in the service provider instead of permanently checking for Octane's presence. I'm worrying it affects performance badly for non-Octane environments.
Also did nothing with unit tests.
Just a small update.
Tested this code
- on the live project with Octane enabled and everything works super-fine
- locally on the regular environment with no Octane --> fine as well
Any news @jangaraev to undraft this? :)
hi. sorry for the silence. I was on vacation last 2 weeks.
The code in PR is good actually, tested this in projects I work on. My idea was to provide proper tests for that, but I have a quite limited experience on testing Octane. so I'm stuck at the moment.
I need to check how to test things in Laravel in default and octane enabled environments.
Any news about merging PR and updating the localization package?
Thanks
Hello! Any news from here? Because there are problems with Laravel Ocatane now. When you use 'localeCookieRedirect', 'localizationRedirect' middlewares, you have got infinitive redirect cycle
@jangaraev Any news about the PR? :wink:
Any updates on this pull request? I would really love Octane support. :)
any update please???? @mcamara
I tried the solution and it didn't solve the problem for me. I also looked into the code of the solution, and it seems a bit hacky, but I'm not that deep into this plugin.
Since this broke my production environment and I needed a multi-language solution fast, I uninstalled this plugin and used this instead: https://github.com/codezero-be/laravel-localized-routes
Worked with Octane out of the box and the migration process was surprisingly easy. I think it is also nice that route:cache
works normally there.
I tried the solution and it didn't solve the problem for me. I also looked into the code of the solution, and it seems a bit hacky, but I'm not that deep into this plugin.
Since this broke my production environment and I needed a multi-language solution fast, I uninstalled this plugin and used this instead: https://github.com/codezero-be/laravel-localized-routes
Worked with Octane out of the box and the migration process was surprisingly easy. I think it is also nice that
route:cache
works normally there.
perfect thanks