-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Deprecate other code related to old factories loading #5059
Deprecate other code related to old factories loading #5059
Conversation
d9229af
to
9d6e23d
Compare
@kennyadsl would make sense to add a warning in the file instructing people to stop requiring it? |
@elia I tried but I think it's still loaded by Zeitwerk when someone require an inner module like 'Spree::TestingSupport::FactoryBot'. Do you know any way to avoid this? |
Are you sure? I tried adding a However, shouldn't we deprecate the method itself? |
Nope, my attempt was removing the file completely and the CI was failing, but maybe thinking twice, it was for another reason, see here. Let me try again.
Yes, you are right, even if it's not used. Considering that it's better to add deprecations to push people to not require this file at all, marking it and its content for removal, does this mean we can do this whole PR later after releasing v4.0? I think it does, no rush on this cleanup. |
We can also release another 3.4.x version with the warning and remove the file altogether on v4, but either way it's not something critical |
People should have started to require testing_support/factory_bot now, so this workaround is no longer needed. Also no one is calling the methods that check for the version of factory_bot, so we can safely deprecate that code.
9d6e23d
to
bf5b7aa
Compare
@waiting-for-dev This PR is now deprecating those methods/files instead of removing them. I think the idea to backport and release a patch is acceptable because we still didn't release v4.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Summary
Ref #5023
People should have started to use
require 'spree/testing_support/factory_bot'
now, so this workaround is no longer needed.Also, no one is calling the methods that check for the version of factory_bot, so we can safely deprecate that code.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: