Skip to content

Commit

Permalink
EZP-27666: Services should depend upon UrlRedecoratorInterface instea…
Browse files Browse the repository at this point in the history
…d of UrlRedecorator (ezsystems#2056)

* EZP-27666: Services should depend upon UrlRedecoratorInterface instead of UrlRedecorator

* fixup! EZP-27666: Services should depend upon UrlRedecoratorInterface instead of UrlRedecorator
  • Loading branch information
adamwojs authored and andrerom committed Jul 18, 2017
1 parent 727f6ea commit 963f50b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Expand Up @@ -10,7 +10,7 @@

use Doctrine\DBAL\Connection;
use DOMDocument;
use eZ\Publish\Core\IO\UrlRedecorator;
use eZ\Publish\Core\IO\UrlRedecoratorInterface;
use eZ\Publish\SPI\Persistence\Content\VersionInfo;
use eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway;
use PDO;
Expand Down Expand Up @@ -41,11 +41,11 @@ class DoctrineStorage extends Gateway
];

/**
* @var \eZ\Publish\Core\IO\UrlRedecorator
* @var \eZ\Publish\Core\IO\UrlRedecoratorInterface
*/
private $redecorator;

public function __construct(UrlRedecorator $redecorator, Connection $connection)
public function __construct(UrlRedecoratorInterface $redecorator, Connection $connection)
{
$this->redecorator = $redecorator;
$this->connection = $connection;
Expand Down
Expand Up @@ -8,7 +8,7 @@
*/
namespace eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway;

use eZ\Publish\Core\IO\UrlRedecorator;
use eZ\Publish\Core\IO\UrlRedecoratorInterface;
use eZ\Publish\Core\Persistence\Database\DatabaseHandler;
use eZ\Publish\SPI\Persistence\Content\VersionInfo;
use eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway;
Expand Down Expand Up @@ -37,11 +37,11 @@ class LegacyStorage extends Gateway
];

/**
* @var \eZ\Publish\Core\IO\UrlRedecorator
* @var \eZ\Publish\Core\IO\UrlRedecoratorInterface
*/
private $redecorator;

public function __construct(UrlRedecorator $redecorator, DatabaseHandler $dbHandler)
public function __construct(UrlRedecoratorInterface $redecorator, DatabaseHandler $dbHandler)
{
@trigger_error(
sprintf('%s is deprecated, use %s instead', self::class, DoctrineStorage::class),
Expand Down
Expand Up @@ -9,7 +9,7 @@
namespace eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter;

use eZ\Publish\Core\IO\IOServiceInterface;
use eZ\Publish\Core\IO\UrlRedecorator;
use eZ\Publish\Core\IO\UrlRedecoratorInterface;
use eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter;
use eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue;
use eZ\Publish\SPI\Persistence\Content\FieldValue;
Expand All @@ -19,13 +19,13 @@

class ImageConverter implements Converter
{
/** @var IOServiceInterface */
/** @var \eZ\Publish\Core\IO\IOServiceInterface */
private $imageIoService;

/** @var UrlRedecorator */
/** @var \eZ\Publish\Core\IO\UrlRedecoratorInterface */
private $urlRedecorator;

public function __construct(IOServiceInterface $imageIoService, UrlRedecorator $urlRedecorator)
public function __construct(IOServiceInterface $imageIoService, UrlRedecoratorInterface $urlRedecorator)
{
$this->imageIoService = $imageIoService;
$this->urlRedecorator = $urlRedecorator;
Expand Down
4 changes: 2 additions & 2 deletions eZ/Publish/SPI/Tests/FieldType/ImageIntegrationTest.php
Expand Up @@ -76,9 +76,9 @@ public function getCustomHandler()
$fieldType = new FieldType\Image\Type();
$fieldType->setTransformationProcessor($this->getTransformationProcessor());

$urlRedecorator = self::$container->get('ezpublish.core.io.image_fieldtype.legacy_url_redecorator');
/** @var \eZ\Publish\Core\IO\UrlRedecorator $urlRedecorator */
$this->ioService = self::$container->get('ezpublish.fieldType.ezimage.io_service');
/** @var \eZ\Publish\Core\IO\UrlRedecoratorInterface $urlRedecorator */
$urlRedecorator = self::$container->get('ezpublish.core.io.image_fieldtype.legacy_url_redecorator');

return $this->getHandler(
'ezimage',
Expand Down

0 comments on commit 963f50b

Please sign in to comment.