Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only set locales on entities managed by knp translations #392

Merged
merged 1 commit into from
Nov 13, 2018

Conversation

jordisala1991
Copy link
Contributor

@jordisala1991 jordisala1991 commented May 24, 2018

There are cases where you could have a entity with the setCurrentLocale method, but that is not a translatable entity managed by KNP.

This PR only sets the default and current locales on entities that are translatable instead of relying on a method existance.

Closes #314
Closes #315

It also fixes compatibility with Sylius, because it uses its own translations implementation, and it is incompatible with having this other bundle installed.

@jordisala1991
Copy link
Contributor Author

Ping @NiR-

@michelcourtade
Copy link

Hi,
same problem here with Sylius (1.2.10) managing his own translations and knp doctrine behaviors for our own entities in our project.
Any chance to see this PR merged soon ?
Thanks !

@AlucardleVash
Copy link
Contributor

Hi,
The next release will use interface instead checking trait usage. It's a BC Break, so it's should be an other major version number. It should fix your trouble too and release soon. We exchange between us to merge this one in v1. The fix work for most of user but some use their own implementation and this PR will break their usage.

@AlucardleVash AlucardleVash merged commit 9cc036e into KnpLabs:master Nov 13, 2018
@michelcourtade
Copy link

Thanks for your response and the merge @AlucardleVash !
Do you have a release date for next version ?

@AlucardleVash
Copy link
Contributor

Not yet but you can follow this require PR :
#389
#387

@michelcourtade
Copy link

Oh ok I'l take a look asap to see progress. By the way, good job on doctrine behavior 👍 !
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Translateable] Attempted to call an undefined method named "setDefaultLocale" of class ...
3 participants