LiipImagineBundle
LiipImagineBundle copied to clipboard
Add support for JsonManifestVersionStrategy
wrap up #1525
- [x] Why is JsonManifestVersionStrategy not found by phpstan?
- [x] Adjust Resources/doc/asset-versioning.rst to document the new functionality
- [ ] Check file format changes @wouterSkepp
@wouterSkepp could you please do a pull request against this branch to adjust the asset versioning documentation ? apart from that i think we are ready to merge.
@dbu I might have overlooked this bundles ability to change formats in my tests. (eg. the original file is a png and the filter reformats it to a .jpg) I just stumbIed across https://github.com/liip/LiipImagineBundle/issues/1198 about it; I've not tested this PR against these cases and I don't think it's handled correctly by my current implementation. (e.g. the filtered jpg still has it's .png extension)
I'm willing to have a look at this later on but it'll take a while because of vacationing plans.
thank you for the heads up! then i will refrain from merging until you (or somebody else) has been able to check that use case and possibly adjust this PR to handle it correctly.
coverage: 81.835% (-0.2%) from 82.018% when pulling 1ec62cd8ac7ee120800402f0585cd42ec1f38f3e on json_manifest_version_strategy_support into 862d5aa0be2e82f0d93764f0527bae098c02a0e9 on 2.x.
@wouterSkepp do you have time to look into this so we can wrap up the feature?
@dbu well this took a bit longer than expected. :)
When converting images to a new format, the extension did not get changed as I suspected. Aparantly that is default behaviour (for non-versioned assets as well), unless you decorate the resolver with the FormatExtensionResolver?
For those cases I've updated the logic, and these now support extension rewriting by the FormatExtensionResolver.
thanks a lot for the contribution!