Releases: liip/LiipImagineBundle
Symfony 5
2.3.0 Symfony 5 (2020-01-07)
Merged pull requests:
- Upgrading to Symfony5 #1246 (michellesanver)
- Upgrading to Symfony5 #1257 (weaverryan)
- Eliminate root_dir usage #1255 (Guite)
- Remove non-functional allow_upscale reference #1257 (Yopai)
- Remove unused packages #1251 (franmomu)
- Fixing bug where apply tag was used but allowed non-supported Twig versions #1249 (weaverryan)
- Use PHPUnit 7.5 and test clean up #1243 (franmomu)
- Fix RemoveCacheCommand with empty path #1239 (franmomu)
- Update UPGRADE.md with a bc break notice #1235 (franmomu)
- Add missing fixed loader service #1232 (franmomu)
- Update orientation documentation #1231 (franmomu)
Symfony 4 compatibility
- Allow unresolvable data roots for filesystem locator (robfrawley)
- Add "fixed-size" filter implementation (peter-gribanov)
- Only use actual path without any query parameters from the url (TiMESPLiNTER)
- Add missing ImageType::getBlockPrefix() method (EmmanuelVella)
- Replace app/console with bin/console (welcoMattic)
- Fix Symfony 4.2 Deprecation Warnings (hjanuschka)
- Fix special characters encoding in URL path (dbalabka)
- Update imagine/imagine dependency to 1.1 (maximgubar)
- Only use actual path without any query parameters from the url (maximgubar)
- [Dependency Injection] Add aliases for data and filter manager (fpaterno)
- Use Autorotate Filter from Imagine library (franmomu)
- Fix Mime deprecations for Symfony 4 (franmomu)
FilterSets and Filters Config exposion
Changelog
- added bypassing of loaders and resolvers configuration #1110 (maximgubar)
- php-cs-fixer: skip native constants check #1107 (maximgubar)
- added ability to inject custom drivers #1105 (maximgubar)
- [Filters] [Config] [DI] Add Filter configuration class as public service #1098 (maximgubar)
- [Data Loader] [Docs] Add chain loader implementation and related docs #1096 (robfrawley)
- Added transparency to background filter #1095 (nielstholenaar)
- [Docs] Add routing removal in Upgrade file #1092 (tifabien)
- [Tests] [Deprecation] Updated bundle notation to accommodate Symfony 4.1 and set browser client to not catch exceptions #1090 (robfrawley)
- moved GitHub-specific documents into .github and split issue template #1089 (maximgubar)
- fix annotation #1072 (auipga)
2.0.0 Release: Major Release
Changelog
- [Post Processors] [Filters] [BC BREAK] Remove configurable post processor interface for one interface and cleanup filter manager #1075 (robfrawley)
- [Meta] Add code of conduct and update contributor instructions #1071 (robfrawley)
- [Dependencies] Update imagine/imagine to ^0.7.1,<0.8 #1067 (robfrawley)
- [Documentation] Correct indentation in AWS-S3 cache resolver documentation #1063 (robfrawley)
- [CS] Globally update code style using new php-cs-fixer rules #1058 (robfrawley)
- [CI] [CS] Add a required php-cs-fixer build run to Travis matrix #1057 (robfrawley)
- [Tests] Add missing PHPUnit @Covers annotations #1054 (robfrawley)
- [CI] Move the "simple-phpunit install" command to Travis install section to collapse the output #1048 (dbu)
- [CS] [Dependencies] [Dependency Injection] [Form] [General] Update compiler log format, remove legacy code, remove deprecated, fix docblocks/style, general Travis config, upgrade coveralls, and general fixes #1047 (robfrawley)
- [CS] Changes to support new php-cs-fixer rule set #1046 (robfrawley)
- [Dependencies] Revert php-cs-fixer development dependency removal #1045 (dbu)
- [Dependency Injection] Detect proper web root path based on Symfony kernel version #1044 (robfrawley)
- [Async] [DI] Make resolve_cache_processor a public service #1043 (silverbackdan)
- [CS] Implement new php-cs-fixer rules and related code cleanup #1040 (sebastianblum)
- [Dependency Injection] Change cache manager from private service to public to fix deprecation #1038 (fabianoroberto)
- [CI] Extend and enhance Travis build matrix #1035 (sebastianblum)
- [Dependencies] Remove unused php-cs-fixer from require-dev #1031 (dbu)
- [Tests] [CI] [Dependencies] Refactored Travis config to use simple-phpunit and remove phpunit Composer dependency #1029 (sebastianblum)
- [Documentation] Fix binary name in png-quant.rst #1026 (bruno-ds)
- [Post-Processors] Replaced ProcessBuilder with Process and add additional tests #1025 (fabianbloching)
- [Tests] Fix tests on Symfony 3.4 and 4.0 #1023 (lsmith77)
- [Dependency Injection] Add alias for cache manager #1022 (garak)
- [Documentation] Align example and description quality values in png-quant.rst #1020 (qkdreyer)
- [Dependency Injection] Change imagine controller from private service to public service #1019 (michaelperrin)
- [Dependencies] Enable Symfony 4.0 support #1013 (lsmith77)
- [Dependencies] Enable Symfony 4.0 support #1010 (llaakkkk)
- [Tests] [CI] Add PHP 7.2 to Travis test matrix #1009 (dbu)
- [Documentation] Fix bucket parameter nesting level in aws_s3.rst YAML example #996 (bocharsky-bw)
- [Data Loader] [Data Locator] [Dependency Injection] Pass root paths to FileSystemLocator during construction #930 (rpkamp)
- [Dependency Injection] [Filter] Implement filter service abstraction for creating images #922 (rpkamp)
Upgrade
-
[Post Processor] [BC BREAK] The
PostProcessorConfigurablePostProcessorInterface
interface has been completely removed and thePostProcessorInterface
interface has been updated to allow passing the configuration array to itsprocess
method as the second parameter. ThePostProcessorInterface::process()
now implements the following signature:process(BinaryInterface $binary, array $options = []): BinaryInterface
. All custom post processors in your project must be updated to match this new signature. -
[Dependencies] The
imagine/Imagine
dependency has been updated from the0.6.x
series to require0.7.1
or greater. If you project has a hard dependency on any prior version, you will need to update your dependencies. -
[Form] The legacy
setDefaultOptions()
andgetName()
methods onForm/Type/ImageType
have been removed, as these methods are no longer required for Symfony. If using them, you will need to update your implementation. -
[Dependency Injection] The
DependencyInjection/Factory/ChildDefinitionTrait
trait has been removed, as it handled logic to support legacy Symfony versions no longer targeted. -
[Dependency Injection] The compiler pass
log
method signature has changed tolog(ContainerBuilder $container, string $message, ...$replacements): void
. If you are extendingAbstractCompilerPass
and using this protected method, you must update your usage. -
[Dependency Injection] The default values for the
liip_imagine.loaders.<name>.filesystem.data_root
andliip_imagine.resolvers.<name>.web_path.web_root
configuration options are now variable based on the Symfony version. For Symfony4.0.0
and later, the value is%kernel.project_dir%/public
, and for prior releases (such as the Symfony3.x
), the value is%kernel.project_dir%/web
. This should automatically provide a suitable default for the different directory structures of the4.x
and3.x
Symfony releases. -
[Dependency Injection] [Filter] A new filter service abstraction is available as
liip_imagine.service.filter
with acreateFilteredBinary($path, $filter, array $runtimeFilters = [])
method to quickly get the filtered binary image and agetUrlOfFilteredImage($path, $filter, $resolver = null)
method to quickly resolve and get the filtered image URL. -
[Data Loader] The
FileSystemLoader::__construct()
method signature has changed in accordance with the prior deprecation notice; the third parameter must be of signature\Liip\ImagineBundle\Binary\Locator\LocatorInterface $locator
and the fourth parameter must be of signaturearray $dataRoots
. -
[Data Loader] The
GridFSLoader
data loader has been removed as the required mongo extension has been deprecated and will not be ported to PHP7.x
. -
[Dependency Injection] A new interface
\Liip\ImagineBundle\DependencyInjection/Factory/FactoryInterface
has been introduced and is shared between the loaders (LoaderFactoryInterface
) and resolvers (ResolverFactoryInterface
). -
[Dependency Injection] All class name parameters have been removed from the service definitions. Instead of overwriting the class name parameters to provide your own implementation, use service decoration.
-
[Data Transformer] The data transformer interface (
\Liip\ImagineBundle\Imagine\Data\Transforme\TransformerInterface
) was deprecated in version1.x
and has been removed. -
[Templating] The imagine extension
\Liip\ImagineBundle\Templating\ImagineExtension
has been renamed toFilterExtension
. Similarly, the template helper\Liip\ImagineBundle\Templating\Helper\ImagineHelper
has been renamed toFilterHelper
. -
[Utility] The
\Liip\ImagineBundle\Utility/Framework/SymfonyFramework::hasDefinitionSharing()
method has been removed due to our higher Symfony requirements rending it unnecessary. -
[General] The use of fully-qualified class name strings is no longer su...
1.9.1 Release: Fix Resolve Command Option Conflict with Symfony 2.x, Enhance Remove and Resolve Commands
Changelog
- [Console] [BC BREAK] The resolve command's --as-script/-s option/shortcut renamed to --machine-readable/-m (fixes #988), its output updated to aligned with the resolve command, and the --machine-readable/-m option added. #991 (robfrawley)
Upgrade
-
[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.
1.9.0 Release: Chain Loaders, Resolution Filter, Imagine Library 0.7, Response Code Configuration, Additional Background Filter Positions
Changelog
- [Tests] Fix filesystem loader deprecation message in tests. #982 (robfrawley)
- [Filter] Add "centerright" and "centerleft" positions to background filter. #974 (cmodijk)
- [Config] Allow to configure the HTTP response code for redirects. #970 (lstrojny)
- [Console] Added --force option, renamed --filters to --filter, and pretty resolve command. #967 (robfrawley)
- [CS] Fix two docblock annotations. #965 (imanalopher)
- [Data Loader] [Deprecation] The FileSystemLoader no longer accepts an array of data root paths; instead pass a FileSystemLocator, which should instead be passed said paths. #963 (robfrawley, rpkamp)
- [Composer] Allow avalanche123/Imagine version 0.7.0. #958 (robfrawley)
- [Data Loader] [Documentation] Add chain loader documentation. #957 (robfrawley)
- [Data Loader] Add chain loader implementation. #953 (robfrawley)
- [CS] Fix templating extension method return type. #951 (imanalopher)
- [Dependency Injection] Fix compiler pass log message typo. #947 (you-ser)
- [Travis] Default to trusty container image (with precise image for php 5.3). #945 (robfrawley)
- [Enqueue] Use simplified transport configuration. #942 (makasim)
- [Filter] Add resolution loader implementation. #941 (robfrawley)
- [Travis] Remove Symfony 3.3 from allowed failures. #940 (robfrawley)
- [Utility] Use simplified Symfony kernel version comparison operation. #939 (robfrawley)
Upgrade
- [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 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.
1.8.0 Release: Background Image Cache Resolver, Flip Filter, Deprecated XML Routing for YAML, PHP-CS-Fixer Reverted
Changelog
- [Minor] [Bug] Revert to php-cs-fixer 1.x and run fixer #927 (robfrawley)
- [Routing] Deprecate XML routing file in favor of YAML #925 (robfrawley)
- [Filter] Add flip filter implementation to core #920 (robfrawley)
- [Queue] Resolve image caches in background using message queue. #919 (makasim)
Upgrade
- [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
.
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