From 48dcd94f0ed512b4a02555a539ec65e222f3614b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pysiak?= Date: Tue, 29 Oct 2024 12:26:10 +0100 Subject: [PATCH] Changes after CR --- UPGRADE-1.14.md | 12 ++++-------- .../Api/Admin/ManagingProductImagesContext.php | 4 +--- .../Compiler/LiipImageFiltersPass.php | 2 ++ .../Resources/config/services/validators.xml | 2 +- .../Bundle/CoreBundle/Twig/FilterExtension.php | 3 +++ 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/UPGRADE-1.14.md b/UPGRADE-1.14.md index e195f11ced..7ab00080a2 100644 --- a/UPGRADE-1.14.md +++ b/UPGRADE-1.14.md @@ -31,16 +31,12 @@ The previous namespaces are still usable, but are considered deprecated and may be removed in future versions of `Resource` packages, update them at your own convenience. -2. Package `enshrined/svg-sanitize` has been removed from the project due to license incompatibility with Sylius. You can still use it in your project by adding it manually. Just add it to your `composer.json` file: +2. Package `enshrined/svg-sanitize` has been removed from the project due to license incompatibility with Sylius. You can still use it in your project by adding it manually: - ```json - { - "require": { - "enshrined/svg-sanitize": "^0.16", - } - } + ```bash + composer require enshrined/svg-sanitize ``` - Also `svg` image support has been removed. If you want to use `svg` images in your project, add `image/svg+xml` to the list of allowed mime types in `CoreBundle` configuration. + Also, uploading `svg` image support has been removed. If you want to use `svg` images in your project, add `image/svg+xml` to the list of allowed mime types in the `CoreBundle` configuration. ```yaml sylius_core: diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingProductImagesContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingProductImagesContext.php index 232c89dca2..2fba888e5b 100644 --- a/src/Sylius/Behat/Context/Api/Admin/ManagingProductImagesContext.php +++ b/src/Sylius/Behat/Context/Api/Admin/ManagingProductImagesContext.php @@ -227,9 +227,7 @@ final class ManagingProductImagesContext implements Context { Assert::contains( $this->responseChecker->getError($this->client->getLastResponse()), - sprintf( - 'The file is not a valid image.', - ), + 'The file is not a valid image.', ); } diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/LiipImageFiltersPass.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/LiipImageFiltersPass.php index 298e4c93f1..7d608fd772 100644 --- a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/LiipImageFiltersPass.php +++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/LiipImageFiltersPass.php @@ -27,6 +27,8 @@ trigger_deprecation( ); /** * @internal + * + * @deprecated */ final class LiipImageFiltersPass implements CompilerPassInterface { diff --git a/src/Sylius/Bundle/CoreBundle/Resources/config/services/validators.xml b/src/Sylius/Bundle/CoreBundle/Resources/config/services/validators.xml index 29b8f19336..9120d70bbe 100644 --- a/src/Sylius/Bundle/CoreBundle/Resources/config/services/validators.xml +++ b/src/Sylius/Bundle/CoreBundle/Resources/config/services/validators.xml @@ -136,7 +136,7 @@ - + %sylius_core.allowed_images_mime_types% diff --git a/src/Sylius/Bundle/CoreBundle/Twig/FilterExtension.php b/src/Sylius/Bundle/CoreBundle/Twig/FilterExtension.php index 7fc02e032d..adfb962b2a 100644 --- a/src/Sylius/Bundle/CoreBundle/Twig/FilterExtension.php +++ b/src/Sylius/Bundle/CoreBundle/Twig/FilterExtension.php @@ -24,6 +24,9 @@ trigger_deprecation( FilterExtension::class, ); +/** + * @deprecated + */ final class FilterExtension extends BaseFilterExtension { public function __construct(private string $imagesPath, CacheManager $cache)