Releases: liip/LiipImagineBundle
1.7.4 Patch Release: Bug Fix
Changelog
- [Bug] Revert adding leading slash to S3 class names #893 (cedricziel)
Upgrade
No upgrade notes for this release.
1.7.3 Patch Release: FileSystem Locator Non-Shared, Auto Bundle Registration, Data Root Indexes
Changelog
- [Tests] Support PHPUnit 5.x (and remove depredations) #887 (robfrawley)
- [Tests] Assert expected deprecation using symfony/phpunit-bridge #886 (robfrawley)
- [Minor] [Docs] Fix typo in general filters documentation #888 (svenluijten)
- [Loader] Add bundle resources to safe path when requested #883 (bobvandevijver, robfrawley)
- [Tests] Enable mongo unit tests on PHP7 using "mongo" => "mongodb" extension adapter #882 (robfrawley)
- [Loader] [Locator] FileSystemLocator service must not be shared #875 (robfrawley)
Upgrade
-
[Data Loader] The
FileSystemLoader
now allows you to assign keys to data roots, and directly reference them when requesting resources.# provide index for data roots liip_imagine: loaders: default: filesystem: data_root: foo: /path/to/foo bar: /path/to/bar
Assume you have a file name
file.ext
in both data root paths. Given the above configuration, you can specifically request the file from the/path/to/foo
root using the following file syntax:@foo:file.ext
. Similarly, you can request the same file from/path/to/bar
using@bar:file.ext
. Note, that the auto-registered bundles (detailed below) are given indexes of their short bundle name (for example, given the bundleFooBundle
, you can request a file from its public resources path via@FooBundle:path/to/file.ext
). -
[Data Loader] The
FileSystemLoader
now supports automatically registering theResources/public
folders within all loaded bundles. This can be enabled via the following configuration.# enable bundle auto-registration liip_imagine: loaders: default: filesystem: bundle_resources: enabled: true
Additionally, you can whitelist or blacklist specific bundles from the auto-registration routine.
# blacklist "FooBundle" from auto-registration liip_imagine: loaders: default: filesystem: bundle_resources: enabled: true access_control_type: blacklist access_control_list: - FooBundle # whitelist "BarBundle" from auto-registration liip_imagine: loaders: default: filesystem: bundle_resources: enabled: true access_control_type: whitelist access_control_list: - BarBundle
-
[Data Locator] The
*Locator
services passed toFileSystemLoader
are now marked as "non-shared" or "prototype" within the DI container, resulting in new instances being passed every time the services are requested.
1.7.2 Patch Release: FileSystem Locator Configuration and Compiler Pass Logs
Changelog
- [Loader] Abstract filesystem resource locator and legacy insecure locator implementation #866 (robfrawley)
- [Minor] [Loader] Fix for FileSystemLoader annotation #868 (tgabi333)
- [DependencyInjection] Container logging for compiler passes #867 (robfrawley)
- [CI] Use Prestissimo package for Travis build #864 (robfrawley)
- [GitHub] Add Hithub templates for issues and PRs #863 (robfrawley)
- [Symfony] Bug fixes and deprecation cleanup for Symfony 3.3 #860 (robfrawley)
- [Filter] Upscale filter should use the highest dimension to calculate ratio #856 (Rattler3)
Upgrade
-
[Data Loader] The
FileSystemLoader
's resource locator has been abstracted out intoFileSystemLocator
(provides the samerealpath
-based locator algorithm introduced in the1.7.0
release) andFileSystemInsecureLocator
(provides the old locator algorithm from version1.6.x
and prior).The latter implementation can present security concerns, as it will blindly following symbolic links, including those that point outside your configured
data_root
directory(ies). It is not recommended unless your deployment process relies heavily on multi-level symbolic links that renders the new locator difficult (and sometime impossible) to
setup. -
[Deprecation] [Data Loader] Instantiating
FileSystemLoader
without providing a forth constructor argument of signature\Liip\ImagineBundle\Binary\Locator\LocatorInterface $locator
is deprecated and the ability to do so will be removed in the next major release,2.0
. -
[Configuration] The
liip_imagine.loaders.default.filesystem.locator
bundle configuration option has been introduced and allows the followingenum
values:filesystem
andfilesystem_insecure
. These correspond to the aforementionedFileSystemLocator
andFileSystemInsecureLocator
resource locator implementations that affect the behavior ofFileSystemLoader
. This option defaults tofilesystem
.# use the current, default locator algorithm liip_imagine: loaders: default: filesystem: locator: filesystem # use the old (pre 0.7.x) locator algorithm liip_imagine: loaders: default: filesystem: locator: filesystem_insecure
-
[Dependency Injection] All compiler passes (filters, post-processors, data loaders, cache resolvers, etc) have been updated to log their behavior, allowing you to easily debug tagged services, including both core-provided and custom services defined by your application). In Symfony
>= 3.2
this output is located in thevar/cache/[dev|prod|env]/app*ProjectContainerCompiler.log
file. Output will be similar to the following example on a fresh install.LoadersCompilerPass: Registered imagine-bimdle binary loader: liip_imagine.binary.loader.default FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.relative_resize FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.resize FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.thumbnail FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.crop FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.grayscale FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.paste FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.watermark FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.background FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.strip FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.scale FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.upscale FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.downscale FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.auto_rotate FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.rotate FiltersCompilerPass: Registered imagine-bimdle filter loader: liip_imagine.filter.loader.interlace PostProcessorsCompilerPass: Registered imagine-bimdle filter post-processor: liip_imagine.filter.post_processor.jpegoptim PostProcessorsCompilerPass: Registered imagine-bimdle filter post-processor: liip_imagine.filter.post_processor.optipng PostProcessorsCompilerPass: Registered imagine-bimdle filter post-processor: liip_imagine.filter.post_processor.pngquant PostProcessorsCompilerPass: Registered imagine-bimdle filter post-processor: liip_imagine.filter.post_processor.mozjpeg ResolversCompilerPass: Registered imagine-bimdle cache resolver: liip_imagine.cache.resolver.default ResolversCompilerPass: Registered imagine-bimdle cache resolver: liip_imagine.cache.resolver.no_cache_web_path
1.7.1 Patch Release: Adds Support for Multiple Filesystem Data Roots
Changelog
- Allow multiple root paths for FileSystemLoader #851 (robfrawley)
- Fix strange wording in readme #847 (svenluijten)
Upgrade
-
[Data Loader] The
FileSystemLoader
data loader performs a more robust security check against image resource paths to ensure they reside within the defined data root path(s). If utilizing symbolic links, you should reference the troubleshooting guide at the end of this upgrade notice. -
[Data Loader] The
FileSystemLoader
data loader now accepts an array of paths (as strings) for its third constructor argument, enabling the loader to check multiple paths for the requested image resource. Note that this change creates a BC break for those relying on the protected class propertyFileSystemLoader::$dataRoot
, whose type has changed tostring[]
and has been renamed to$dataRoots
(plural). -
[Configuration] The
liip_imagine.loaders.default.filesystem.data_root
configuration option now accepts an array of paths (as strings), or a single string path (to preserve BC). This change allows thefilesystem
data loader to check multiple data root paths for the requested image resource. The following YML configuration provides examples using both a string and an array for the value.# provide an array of scalar paths liip_imagine: loaders: default: filesystem: data_root: - /multiple/root/paths/foo - /multiple/root/paths/bar # provide an single scalar path liip_imagine: loaders: default: filesystem: data_root: /single/root/path
-
[Troubleshooting] If you are using the
FileSystemLoader
data loader in conjunction with symbolic links that point outside thedata_root
(which defaults to%kernel.root_dir%/../web
) then you are required to set all outside resource paths under thedata_root
option.The following is a list of the most common exception error messages encountered when the
data_root
option is not correctly configured- Source image not resolvable "%s" in root path(s) "%s"
- Source image invalid "%s" as it is outside of the defined root path(s) "%s"
The full option key for
data_root
isliip_imagine.loaders.default.filesystem.data_root
Code quality improvements, bugfixes and beginning preparations for 2.0
- Set DefaultMetadataReader when ext-exif is not present #841 (cedricziel)
- Updating twig call to utilise asset(), to match README.md (closes #830) #836 (antoligy)
- Exclude "Tests" directory from classmap #835 (pamil)
- Require components that no longer ship with Symfony FrameworkBundle 3.2 #832 (rpkamp)
- Document how web paths are built #829 (greg0ire)
- Wrap relative path with asset() Twig function #825 (bocharsky-bw)
- Update data-loaders.rst #821 (IllesAprod)
- Updating 2.0 with corrections from 1.0 #820 (antoligy)
- Typo fix #819 (redjanym)
- Fix RST indentation error in AWS S3 cache resolver documentation #809 (GeoffreyHervet)
- Update basic-usage.rst #805 (you-ser)
- Add data_loader config to doc #803 (davidfuhr)
- RST Typo Fix and Clarification for Watermark Docs #802 (robfrawley)
- Update Source to Newly Merged Style Rule Additions #800 (robfrawley)
- Bugfix: Remove Short Array Syntax and Fix (Minor) Recent Merge Issues #799 (robfrawley)
- Add Symfony Framework 3.1.x and 3.2-dev to build matrix #796 (cedricziel)
- Add visibility argument to service definition #795 (cedricziel)
- Bugfix for Failing Tests Introduced in #777 #793 (robfrawley)
- Added php_cs.dist / Updated .styleci.yml / Fixed and updated .travis.yml #792 (robfrawley)
- Add LICENSE.md #790 (robfrawley)
- Updated README.md and RST Documentation #789 (robfrawley)
- Updated CHANGELOG.md #788 (robfrawley)
- List deprecation - closes #731 #787 (antoligy)
- Cleanup FileSystemLoader (Followup to #775) #785 (robfrawley)
- Tempdir for postprocessors #779 (jehaby)
- Add visibility argument to flysystem resolver #777 (cedricziel)
- Amend path resolution handlers and outside root check conditional in FileSystemLoader #775 (robfrawley)
- Scale filter and Downscale and Upscale as derivatives, with a new feature #773 (deviprsd21)
- Applied fixes from StyleCI #768 (lsmith77)
- Replaced deprecated factory_class and factory_method #767 (rvanlaarhoven)
- Update basic-usage.rst #766 (nochecksum)
- Implemented ConfigurablePostProcessorInterface in OptiPngPostProcessor #764 (jehaby)
various bug fixes, added Flysystem resolver and various other feature additions
Note this release requires a higher minimal version of the imagine library "imagine/Imagine": "^0.6.3,<0.7",
- Fix tempnam usages #723
- Quote strings starting '%' in YAML #745
- Add Flysystem resolver #715
- background filter: allow image positioning #721
- Implement Imagine Grayscale filter #638
- Downscale filter scales an image to fit bounding box #696
- Ignore invalid exif orientations #751
- Add configuration options for jpegoptim post-processor
- Enable configuration of post processors using parameters #720 / #756 / #759
Release 1.5.3
- Introduce mozjpeg and pngquant post-processors, add transform options.
Release 1.5.2
- Fix regression in background filter.
Release 1.5.1
- Contains regression fix
Release 1.5.0
- Added ability to process large files stored locally.