Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cs #1547

Merged
merged 1 commit into from
Jan 2, 2024
Merged

fix cs #1547

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
symfony: '*'
stability: 'stable'

# Test each supported Symfony version with lowest supported PHP version
# Test each supported Symfony version with the lowest supported PHP version
- php: '7.2'
dependencies: highest
symfony: '3.4.*'
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file contains a complete enumeration of all [pull requests](https://github.
for a given releases. Unreleased, upcoming changes will be updated here periodically; reference the next release on our
[milestones](https://github.com/liip/LiipImagineBundle/milestones) page for the latest changes.

# 2.x

## [2.12.1](https://github.com/liip/LiipImagineBundle/tree/2.12.1)

- Adjustments to install with Symfony 7 ([mbabker](https://github.com/liip/LiipImagineBundle/pull/1535))
Expand Down
2 changes: 1 addition & 1 deletion Imagine/Cache/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CacheManager
protected $signer;

/**
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
* @var EventDispatcherInterface
*/
protected $dispatcher;

Expand Down
4 changes: 2 additions & 2 deletions Imagine/Cache/Resolver/AwsS3Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function remove(array $paths, array $filters)
*
* If the option is already set, it will be overwritten.
*
* @see \Aws\S3\S3Client::getObjectUrl() for available options
* @see S3Client::getObjectUrl() for available options
*
* @param string $key The name of the option
* @param mixed $value The value to be set
Expand All @@ -196,7 +196,7 @@ public function setGetOption($key, $value)
*
* If the option is already set, it will be overwritten.
*
* @see \Aws\S3\S3Client::putObject() for available options
* @see S3Client::putObject() for available options
*
* @param string $key The name of the option
* @param mixed $value The value to be set
Expand Down
2 changes: 1 addition & 1 deletion Imagine/Filter/Loader/PasteFilterLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(ImagineInterface $imagine, $projectDir)
}

/**
* @see \Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface::load()
* @see LoaderInterface::load
*
* @return ImageInterface|static
*/
Expand Down
2 changes: 1 addition & 1 deletion Imagine/Filter/Loader/WatermarkFilterLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(ImagineInterface $imagine, $projectDir)
}

/**
* @see \Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface::load()
* @see LoaderInterface::load
*
* @return ImageInterface|static
*/
Expand Down
2 changes: 1 addition & 1 deletion Imagine/Filter/RelativeResize.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RelativeResize implements FilterInterface
* @param string $method BoxInterface method
* @param mixed $parameter Parameter for BoxInterface method
*
* @throws \Imagine\Exception\InvalidArgumentException
* @throws InvalidArgumentException
*/
public function __construct($method, $parameter)
{
Expand Down
2 changes: 1 addition & 1 deletion Tests/DependencyInjection/LiipImagineExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
class LiipImagineExtensionTest extends AbstractTest
{
/**
* @var \Symfony\Component\DependencyInjection\ContainerBuilder
* @var ContainerBuilder
*/
protected $containerBuilder;

Expand Down
18 changes: 10 additions & 8 deletions Tests/Functional/Controller/ImagineControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use Liip\ImagineBundle\Imagine\Cache\Signer;
use Liip\ImagineBundle\Tests\Functional\AbstractSetupWebTestCase;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

/**
* @covers \Liip\ImagineBundle\Controller\ImagineController
Expand All @@ -37,7 +39,7 @@ protected function setUp(): void
// supported by the current PHP build or not. Enabling WebP in configurations will drop all tests if WebP is
// not supported.
if ($this->webp_generate) {
$filterService = self::getService('test.liip_imagine.service.filter');
$filterService = $this->getService('test.liip_imagine.service.filter');
$webpGenerate = new \ReflectionProperty($filterService, 'webpGenerate');
$webpGenerate->setAccessible(true);
$webpGenerate->setValue($filterService, true);
Expand Down Expand Up @@ -162,7 +164,7 @@ public function testShouldResolveWebPFromCache(): void

public function testThrowBadRequestIfSignInvalidWhileUsingCustomFilters(): void
{
$this->expectException(\Symfony\Component\HttpKernel\Exception\BadRequestHttpException::class);
$this->expectException(BadRequestHttpException::class);
$this->expectExceptionMessage('Signed url does not pass the sign check for path "images/cats.jpeg" and filter "thumbnail_web_path" and runtime config {"thumbnail":{"size":["50","50"]}}');

$this->client->request('GET', '/media/cache/resolve/thumbnail_web_path/rc/invalidHash/images/cats.jpeg?'.http_build_query([
Expand All @@ -175,7 +177,7 @@ public function testThrowBadRequestIfSignInvalidWhileUsingCustomFilters(): void

public function testShouldThrowNotFoundHttpExceptionIfFiltersNotArray(): void
{
$this->expectException(\Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class);
$this->expectException(NotFoundHttpException::class);
$this->expectExceptionMessage('Filters must be an array. Value was "some-string"');

$this->client->request('GET', '/media/cache/resolve/thumbnail_web_path/rc/invalidHash/images/cats.jpeg?'.http_build_query([
Expand All @@ -186,23 +188,23 @@ public function testShouldThrowNotFoundHttpExceptionIfFiltersNotArray(): void

public function testShouldThrowNotFoundHttpExceptionIfFileNotExists(): void
{
$this->expectException(\Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class);
$this->expectException(NotFoundHttpException::class);
$this->expectExceptionMessage('Source image for path "images/shrodinger_cats_which_not_exist.jpeg" could not be found');

$this->client->request('GET', '/media/cache/resolve/thumbnail_web_path/images/shrodinger_cats_which_not_exist.jpeg');
}

public function testInvalidFilterShouldThrowNotFoundHttpException(): void
{
$this->expectException(\Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class);
$this->expectException(NotFoundHttpException::class);

$this->client->request('GET', '/media/cache/resolve/invalid-filter/images/cats.jpeg');
}

public function testShouldResolveWithCustomFiltersPopulatingCacheFirst(): void
{
/** @var Signer $signer */
$signer = self::getService('liip_imagine.cache.signer');
$signer = $this->getService('liip_imagine.cache.signer');

$params = [
'filters' => [
Expand Down Expand Up @@ -240,7 +242,7 @@ public function testShouldResolveWithCustomFiltersPopulatingCacheFirst(): void
public function testShouldResolveWithCustomFiltersPopulatingCacheFirstWebP(): void
{
/** @var Signer $signer */
$signer = self::getService('liip_imagine.cache.signer');
$signer = $this->getService('liip_imagine.cache.signer');

$params = [
'filters' => [
Expand Down Expand Up @@ -283,7 +285,7 @@ public function testShouldResolveWithCustomFiltersPopulatingCacheFirstWebP(): vo
public function testShouldResolveWithCustomFiltersFromCache(): void
{
/** @var Signer $signer */
$signer = self::getService('liip_imagine.cache.signer');
$signer = $this->getService('liip_imagine.cache.signer');

$params = [
'filters' => [
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"symfony/dependency-injection": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/form": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/messenger": "^4.4|^5.3|^6.0|^7.0",
"symfony/phpunit-bridge": "^5.3|^6.0|^7.0",
"symfony/phpunit-bridge": "^7.0.2",
"symfony/templating": "^3.4|^4.4|^5.3|^6.0",
"symfony/validator": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/yaml": "^3.4|^4.4|^5.3|^6.0|^7.0"
Expand Down
Loading