All important upgrade requirements will be enumerated in this
UPGRADE.md
file and all notable alterations to this project will be documented in the
CHANGELOG.md
file.
This project adheres to semantic versioning.
View the changelog entry for the 1.9.1
release.
-
[Console] [BC BREAK] The resolve command's
--as-script
/-s
option name/shortcut conflicted with Symfony 2.x core console options (specifically--shell
/-s
) and has been renamed to--machine-readable
/-m
(fixes #988). The-s
option shortcut was the only conflict, but the--as-script
option name proved confusing and unclear so it too was renamed. -
[Console] The output formatting for the
remove
command has been updated and aligned with the behavior previously introduced in1.9.0
for theresolve
command, making both of them consistent and in-line with the expected2.0.0
output. The--machine-readable
/-m
option name/shortcut has now been added to theremove
command as well, enabling predictable, consistent, script parseable output stripped of text styles and supplemental formatting.
View the changelog entry for the 1.9.0
release.
-
[Data Loader] The arguments for the
FileSystemLoader
class constructor have changed. Passing an array of roots as the third parameter and an (optional)LocatorInterace
as the fourth parameter is deprecated. ALocatorInterface
should now be passed as third parameter, and the array of data roots to theLocatorInterface::__construct()
method directly. All prior signatures will continue to work until2.0
is release. -
[Console] Added the
--force
parameter to resolve console command to force image resolution regardless of cache. Added the--as-script
parameter to resolve console command to disable verbose, "prettified" output. -
[Composer] Imagine library upgraded to version 0.7.x.
View the changelog entry for the 1.8.0
release.
- [Routing] The
Resources/config/routing.xml
file has been deprecated and will be removed in2.0
. Use the new YAML variant moving forwardResources/config/routing.yaml
.
View the changelog entry for the 1.7.3
release.
-
[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.
View the changelog entry for the 1.7.2
release.
-
[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
View the changelog entry for the 1.7.1
release.
-
[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: this change breaks those extending this class and relying on the protected property$dataRoot
, which has been renamed to$dataRoots
and is now of the typestring[]
instead of the prior type ofstring
. -
[Configuration] The
liip_imagine.loaders.default.filesystem.data_root
bundle configuration option now accepts an array of paths (as strings) or a single scalar path ()if only one is required for your configuration), allowing thefilesystem
data loader to check multiple data root paths for the requested image resource. The following YML configuration shows examples for all allowed value types.# 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
filesystem
data loader and have symbolic links within thedata_root
that point outside this path (thedata_root
option defaults to%kernel.root_dir%/../web
) then you are required to configure all outside resource paths as additionaldata_root
paths using the following option key in your application's configuration:liip_imagine.loaders.default.filesystem.data_root
.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"
-
View the changelog entry for the 1.0.0-alpha7
release.
-
[Configuration]
liip_imagine.controller_action
option was removed in favour of an array of actions. Seeliip_imagine.controller
config-liip_imagine: - controller_action: AcmeDemoBundle:Default:filterAction +liip_imagine: + controller: + filter_action: AcmeDemoBundle:Default:filterAction
View the changelog entry for the 1.0.0-alpha6
release.
-
[Route]
ImagineLoader
was removed. Please adjust yourapp/config/routing.yml
file.-_imagine: - resource: . - type: imagine +_liip_imagine: + resource: "@LiipImagineBundle/Resources/config/routing.xml"
-
[Configuration]
liip_imagine.filter_sets.route
option and sub options were removed. -
[Configuration]
liip_imagine.cache_prefix
option was removed.
View the changelog entry for the 1.0.0-alpha5
release.
-
[Symfony] Required minimum symfony version was updated to 2.3.
-
[Logger] Symfony
LoggerInterface
was replaced with PSR-3 one. -
[Cache] New
isStored
method was added. -
[Cache] The method
ResolverInterface::getBrowserPath
was removed. -
[Cache] The method
ResolverInterface::store
acceptBinaryInterface
as first argument. -
[Cache] The method
ResolverInterface::store
return nothing. -
[Cache] The method
ResolverInterface::remove
return nothing. -
[Cache] The method
ResolverInterface::remove
takes required array of filter as first argument. -
[Cache] The method
ResolverInterface::remove
takes optional path as second argument. -
[Cache] The method
ResolverInterface::clean
was removed. -
[Cache] The method
ResolverInterface::resolve
takes path and filter as arguments. -
[Cache] The method
ResolverInterface::resolve
return absolute url of the cached image. -
[Cache] The method
CacheManager::resolve
may throw OutOfBoundsException if required resolver does not exist. -
[Cache] The method
CacheManager::resolve
return absolute url of the cached image. -
[Cache] The method
CacheManager::store
acceptBinaryInterface
as first argument. -
[Cache] The method
CacheManager::store
return nothing. -
[Cache] The method
CacheManager::clearResolversCache
was removed. -
[Cache] The method
CacheManager::getWebRoot
was removed. -
[Cache] The method
CacheManager::getBrowserPath
third argument was changed, now it isruntimeConfig
. -
[Cache] The method
CacheManager::generateUrl
third argument was changed, now it isruntimeConfig
. -
[Cache]
NoCacheResolver
renamed toNoCacheWebPathResolver
. -
[Cache]
AbstractFilesystemResolver
was removed. -
[Data Loader]
LoaderInterface::find
now can return string orBinaryInterface
instance. -
[Data Loader]
DataManager::find
now can returnBinaryInterface
instance only. -
[Data Loader] All data loaders moved to
Binary/Loader
folder. -
[Data Loader] Tag name
liip_imagine.data.loader
changed toliip_imagine.binary.loader
-
[Data Loader] Parameter key
liip_imagine.data.loader.filesystem.class
changed toliip_imagine.binary.loader.filesystem.class
-
[Data Loader] Parameter key
liip_imagine.data.loader.stream.class
changed toliip_imagine.binary.loader.stream.class
-
[Data Loader] Service id
liip_imagine.data.loader.prototype.filesystem
changed toliip_imagine.binary.loader.prototype.filesystem
-
[Data Loader] Service id
liip_imagine.data.loader.prototype.stream
changed toliip_imagine.binary.loader.prototype.stream
-
[Filter]
FilterManager::applyFilter
now return instance ofBinaryInterface
. -
[Filter]
FilterManager::applyFilter
first argument was changed from Image instance to BinaryInterface one. -
[Filter]
FilterManager::get
was removed. -
[Configuration]
liip_imagine.filter_sets.path
option was removed. -
[Configuration]
liip_imagine.filter_sets.format
option was removed. -
[Configuration]
liip_imagine.cache_mkdir_mode
option was removed. -
[Configuration]
liip_imagine.web_root
option was removed. -
[Configuration]
liip_imagine.cache
default value was changed fromweb_path
todefault
. -
[Configuration]
liip_imagine.formats
option was removed. -
[Configuration]
liip_imagine.data_root
option was removed.