-
-
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
[Fixtures] Add a fixture listener for removing images #14095
[Fixtures] Add a fixture listener for removing images #14095
Conversation
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.
👍 but the problem is we already have a .gitkeep file placed in public/media/image/
directory, which will also be removed after running the fixtures and therefore would result in changed in the repository 💃 Maybe it would be better to remove all the things (files and catalogues) from the inside of images directory omitting the .gitkeep
file? 🤔
0625ab7
to
fa75b00
Compare
fa75b00
to
cd238b4
Compare
I've refactored this code by removing all files from the given directory and creating the |
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.
👍 I wonder now couldn't it be named FilesPurgerListener
and land in the SyliusFixturesBundle itself 🚀 It would then be possible to use it e.g. for invoices removal with SyliusInvoicingPlugin
Thanks, Grzegorz! 🎉 |
This PR was merged into the 1.11 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.11| | Bug fix? | yes | | New feature? | no | | BC breaks? | no | | Deprecations? | no| | Related tickets | fixes #14095 | | License | MIT | <!-- - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- 40e3edb [Fixtures] Fix removing images before suite
Currently without removing pictures when loading fixtures, the images directory can grow unnecessarily very quickly.