-
Notifications
You must be signed in to change notification settings - Fork 203
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
IBX-296: Provided new way to handle archived versions #3110
IBX-296: Provided new way to handle archived versions #3110
Conversation
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/LegacyStorage.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishCoreBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/LegacyStorage.php
Outdated
Show resolved
Hide resolved
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'm not sure if proper integration tests can be written without introducing a lot of additional code, so 👍 from me.
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 would deprecate current countImageReferences
method and provide a proper copy of it without like
but eq
. We know that our countImageReferences
should never be used as it is flawed by design.
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.
Indeed I don't see easy way to modify that specific config for tests. We need to think about that as a follow up.
One remark:
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/LegacyStorage.php
Outdated
Show resolved
Hide resolved
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.
QA Approved - tested on 2.5.21 and 3.3.5
You can merge it up now. |
7.5
Fix is built from two separate approaches:
Disable removing archived versions on publish by using
remove_archived_versions_on_publish
configuration. That can save some time based on how many versions are going to be removed. If someone knows what he is doing, that process can be moved to scheduledezplatform:content:cleanup-versions
command.There are a lot of expensive count calls with
WHERE LIKE
toezimagefile
table in\eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway\DoctrineStorage::countImageReferences
. As it seems there is no need to useLIKE
in current case, newisImageReferenced
method was introduced.but:
3. I have no idea how to implement proper integration tests with changes to content service settings.
QA:
This needs testing in both areas:
TODO:
$ composer fix-cs
).