From 63d9dbab513018cbadef639ea67c13721d88eb35 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Wed, 3 Jan 2024 09:22:05 -0500 Subject: [PATCH 1/5] Add aliases for manager services for improved autowiring support --- Resources/config/imagine.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Resources/config/imagine.xml b/Resources/config/imagine.xml index 21d10c50..07cfaab5 100644 --- a/Resources/config/imagine.xml +++ b/Resources/config/imagine.xml @@ -125,6 +125,7 @@ + @@ -133,6 +134,7 @@ %liip_imagine.binary.loader.default% %liip_imagine.default_image% + @@ -142,6 +144,7 @@ %liip_imagine.cache.resolver.default% %liip_imagine.webp.generate% + %liip_imagine.filter_sets% From ed9bd99026165a3bd2a2b652d6577e838e833eb3 Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Sat, 6 Jan 2024 07:12:17 -0600 Subject: [PATCH 2/5] add deprecation note. --- Resources/doc/cache-resolver/amazons3.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Resources/doc/cache-resolver/amazons3.rst b/Resources/doc/cache-resolver/amazons3.rst index 3975b7e8..540da4fe 100644 --- a/Resources/doc/cache-resolver/amazons3.rst +++ b/Resources/doc/cache-resolver/amazons3.rst @@ -7,6 +7,8 @@ Amazon S3 Resolver The ``AmazonS3Resolver`` resolver enables cache resolution using the ``\AmazonS3`` storage API. +This will be deprecated in Version 3, use aws-s3 resolver instead. + Dependencies ------------ @@ -15,7 +17,7 @@ by executing the following command in your project directory: .. code-block:: bash - $ composer require aws/aws-sdk-php + composer require aws/aws-sdk-php Configuration ------------- From aad39cdf6b646d63d11b0a1eeee24ccf923bfe31 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 26 Feb 2024 15:48:40 +0100 Subject: [PATCH 3/5] Update Resources/doc/cache-resolver/amazons3.rst --- Resources/doc/cache-resolver/amazons3.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/doc/cache-resolver/amazons3.rst b/Resources/doc/cache-resolver/amazons3.rst index 540da4fe..2661da47 100644 --- a/Resources/doc/cache-resolver/amazons3.rst +++ b/Resources/doc/cache-resolver/amazons3.rst @@ -7,7 +7,7 @@ Amazon S3 Resolver The ``AmazonS3Resolver`` resolver enables cache resolution using the ``\AmazonS3`` storage API. -This will be deprecated in Version 3, use aws-s3 resolver instead. +**Deprecated**, use the aws-s3 resolver instead. The legacy AmazonS3Resolver will be removed in version 3. Dependencies ------------ From 13be8f6810407a34241c1efe6ffcbded4f3efc39 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 26 Feb 2024 15:54:28 +0100 Subject: [PATCH 4/5] adjust doc to use class name as service name --- Resources/doc/basic-usage.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Resources/doc/basic-usage.rst b/Resources/doc/basic-usage.rst index 66dc86b4..8c64f5be 100644 --- a/Resources/doc/basic-usage.rst +++ b/Resources/doc/basic-usage.rst @@ -203,9 +203,9 @@ available filters will be resolved). Resolve Programmatically ~~~~~~~~~~~~~~~~~~~~~~~~ -You can resolve the image URL in your code using the ``getBrowserPath`` -method of the ``liip_imagine.cache.manager`` service. Assuming you already -have the service assigned to a variable called ``$imagineCacheManager``, +You can resolve the image URL in your code using the ``getBrowserPath`` method +of the ``Liip\ImagineBundle\Imagine\Cache\CacheManager`` service. Assuming you +already have the service assigned to a variable called ``$imagineCacheManager``, you would run: .. code-block:: php @@ -214,9 +214,7 @@ you would run: Often, you need to perform this operation in a controller. -You can access the ``CacheManager`` simply by type hinting it in your controller method: the service -``liip_imagine.cache.manager`` will be automatically injected and you will be able to call -``getBrowserPath`` on a relative image path to get its resolved location. +In a controller, this can look as follows: .. code-block:: php @@ -224,7 +222,7 @@ You can access the ``CacheManager`` simply by type hinting it in your controller namespace App\Controller; - use \Liip\ImagineBundle\Imagine\Cache\CacheManager; + use Liip\ImagineBundle\Imagine\Cache\CacheManager; class YourController { From 118d41993c2d47d8caf21c450c980cf00b0f88bb Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 26 Feb 2024 15:59:25 +0100 Subject: [PATCH 5/5] fix cs issue --- Tests/Imagine/Cache/Resolver/AwsS3ResolverTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Imagine/Cache/Resolver/AwsS3ResolverTest.php b/Tests/Imagine/Cache/Resolver/AwsS3ResolverTest.php index 76ae80d9..f3e52d9d 100644 --- a/Tests/Imagine/Cache/Resolver/AwsS3ResolverTest.php +++ b/Tests/Imagine/Cache/Resolver/AwsS3ResolverTest.php @@ -344,7 +344,7 @@ public function testCatchAndLogExceptionForFilterOnRemove(): void } /** - * @return MockObject|\Aws\S3\S3Client + * @return MockObject|S3Client */ protected function getS3ClientMock() {