-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Resource] Fix ObjectToIdentifierTransformer bad implementation #3406
[Resource] Fix ObjectToIdentifierTransformer bad implementation #3406
Conversation
@Zales0123 what about Behat scenario for this bug? |
@michalmarcinkowski I can of course write scenario like this:
but it looks quite artificial. Do we need this only because some bug with some class has occurred? I'm really asking, not judging, sincerely :) |
Could we remove this https://github.com/Sylius/Sylius/blob/master/src/Sylius/Bundle/SettingsBundle/Transformer/ObjectToIdentifierTransformer.php transformer then? |
@Zales0123 answering to your question. I think we need a debate about the economy of tests and what we should test using Behat. The test suites are really big right now and I'm not sure what to do with them. On one hand we need tests for such basic, but crucial operations like moving back and forth on the checkout on the other hand we can't test every possible UI interaction with Behat, because it will lead to tests execution for days instead of minutes/hours 😄 |
It's more than satisfying answer 👍 Ok, so for now, I'll add this scenario, to be 100% sure that this nasty bug will not happen anymore. |
…sformer [Resource] Fix ObjectToIdentifierTransformer bad implementation
Thank you Mateusz! 👍 |
…r-transformer [Resource] Fix ObjectToIdentifierTransformer bad implementation
…r-transformer [Resource] Fix ObjectToIdentifierTransformer bad implementation
While fixing #2979 I realized, that
ObjectToIdentifierTransformer
has inversely implemented methods! It caused mentioned bug, but also some others. There is open PR for this issue (#3085) with implemented custom transformer, but I think it will be not necessary after accepting this one ;)