-
Notifications
You must be signed in to change notification settings - Fork 379
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
Generate WebP in liip:imagine:cache:resolve CLI command and async resolve cache messages #1347
Conversation
Build failed because for PHP 8 used PHPUnit 9 what is not compatible with current tests. See fix #1381 |
d8c6827
to
f6293f0
Compare
fae75c0
to
67ccad5
Compare
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.
sorry for the late reply. this looks good to me, and a nice refactoring to move the warmup into the filter service.
i have some nitpicks, can you please have a look?
if #1360 is merged first, we need to adjust the logic in the symfony messenger processor to follow the changes done here. |
0675849
to
352ee17
Compare
@dbu renamed the method to |
The order of the merger is not critical. I can make changes to my PR after #1360 merge. |
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.
thanks a lot! i really like that we move from talking about "resolving" to "warmup" 👍
#1360 won the race ;-) can you please rebase this branch on 2.x and apply your refactoring to WarmupCacheHandler?
i am worried a bit by how much mocking we are doing in one of the unit tests. but if you are happy with it, we can leave it like that, just want to ask the question.
/** | ||
* @covers \Liip\ImagineBundle\Service\FilterService | ||
*/ | ||
final class FilterServiceTest extends TestCase |
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.
there is a LOT of mocking going on in this test. i wonder if we could not move towards a more functional test that uses the real managers instead of mocking. if tests fail, it will be a bit harder to know where the mistake was - but if they succeed, they create more trust that things actually work as expected.
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 agree that it would be great to supplement the unit tests with functional tests, but unfortunately i don't have time to do this 😕
352ee17
to
4c3e68f
Compare
done |
thanks a lot! i will look into creating a new minor release next week. |
The
liip:imagine:cache:resolve
CLI command warms up the cache for the specified image sources with all or specified filters applied, and prints the list of cache files. I forgot that this command should also create a image in WebP format if WebP generation is enabled.FilterService::warmsUpCache()
;FilterService::bustCache()
now return result of busting;liip:imagine:cache:resolve
command now warms up image in WebP format too;liip:imagine:cache:remove
command now remove image in WebP format too;ResolveCacheProcessor
wat async warms up cache now warmed up image in WebP format too;FilterPathContainer
;FilterService
.