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

IBX-2153: Moved ConfigResolverInterface into contracts #25

Merged
merged 3 commits into from
Jan 31, 2022
Merged
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
4 changes: 2 additions & 2 deletions src/lib/Configuration/Provider/AlloyEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
namespace Ibexa\FieldTypeRichText\Configuration\Provider;

use Ibexa\Bundle\FieldTypeRichText\DependencyInjection\Configuration\Parser\FieldType\RichText;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\FieldTypeRichText\Configuration\Provider;
use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\FieldTypeRichText\Configuration\UI\Mapper\OnlineEditorConfigMapper;

/**
Expand All @@ -23,7 +23,7 @@ final class AlloyEditor implements Provider
/** @var array */
private $alloyEditorConfiguration;

/** @var \Ibexa\Core\MVC\ConfigResolverInterface */
/** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */
private $configResolver;

/** @var \Ibexa\FieldTypeRichText\Configuration\UI\Mapper\OnlineEditorConfigMapper */
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Configuration/Provider/CKEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
namespace Ibexa\FieldTypeRichText\Configuration\Provider;

use Ibexa\Bundle\FieldTypeRichText\DependencyInjection\Configuration\Parser\FieldType\RichText;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\FieldTypeRichText\Configuration\Provider;
use Ibexa\Core\MVC\ConfigResolverInterface;

/**
* CKEditor configuration provider.
Expand All @@ -22,7 +22,7 @@ final class CKEditor implements Provider
private const SEPARATOR = '|';
private const CUSTOM_STYLE_INLINE = 'ibexaCustomStyleInline';

/** @var \Ibexa\Core\MVC\ConfigResolverInterface */
/** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */
private $configResolver;

/** @var array */
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Configuration/Provider/CustomStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace Ibexa\FieldTypeRichText\Configuration\Provider;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\FieldTypeRichText\Configuration\Provider;
use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\FieldTypeRichText\Configuration\UI\Mapper\CustomTemplateConfigMapper;

/**
Expand All @@ -19,7 +19,7 @@
*/
final class CustomStyle implements Provider
{
/** @var \Ibexa\Core\MVC\ConfigResolverInterface */
/** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */
private $configResolver;

/** @var \Ibexa\FieldTypeRichText\Configuration\UI\Mapper\CustomStyle */
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Configuration/Provider/CustomTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace Ibexa\FieldTypeRichText\Configuration\Provider;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\FieldTypeRichText\Configuration\Provider;
use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\FieldTypeRichText\Configuration\UI\Mapper\CustomTemplateConfigMapper;

/**
Expand All @@ -19,7 +19,7 @@
*/
final class CustomTag implements Provider
{
/** @var \Ibexa\Core\MVC\ConfigResolverInterface */
/** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */
private $configResolver;

/** @var \Ibexa\FieldTypeRichText\Configuration\UI\Mapper\CustomTag */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/RichText/Converter/Html5.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Ibexa\FieldTypeRichText\RichText\Converter;

use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\FieldTypeRichText\RichText\Converter\Xslt as XsltConverter;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/lib/RichText/Converter/Html5Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Ibexa\FieldTypeRichText\RichText\Converter;

use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\FieldTypeRichText\RichText\Converter\Xslt as XsltConverter;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/lib/RichText/Converter/Html5Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Ibexa\FieldTypeRichText\RichText\Converter;

use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\FieldTypeRichText\RichText\Converter\Xslt as XsltConverter;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/lib/RichText/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;
use Ibexa\Contracts\Core\Repository\Repository;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\FieldTypeRichText\RichText\RendererInterface;
use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\Core\MVC\Symfony\Security\Authorization\Attribute as AuthorizationAttribute;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
Expand Down Expand Up @@ -56,7 +56,7 @@ class Renderer implements RendererInterface
protected $embedConfigurationNamespace;

/**
* @var \Ibexa\Core\MVC\ConfigResolverInterface
* @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface
*/
protected $configResolver;

Expand All @@ -83,7 +83,7 @@ class Renderer implements RendererInterface
/**
* @param \Ibexa\Contracts\Core\Repository\Repository $repository
* @param \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker
* @param \Ibexa\Core\MVC\ConfigResolverInterface $configResolver
* @param \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface $configResolver
* @param \Twig\Environment $templateEngine
* @param string $tagConfigurationNamespace
* @param string $styleConfigurationNamespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Ibexa\FieldTypeRichText\Translation\Extractor;

use Ibexa\Bundle\FieldTypeRichText\DependencyInjection\Configuration\Parser\FieldType\RichText;
use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use JMS\TranslationBundle\Model\Message\XliffMessage;
use JMS\TranslationBundle\Model\MessageCatalogue;
use JMS\TranslationBundle\Translation\ExtractorInterface;
Expand All @@ -24,7 +24,7 @@ final class OnlineEditorCustomAttributesExtractor implements ExtractorInterface
private const CLASS_LABEL_MESSAGE_ID = 'ezrichtext.classes.class.label';

/**
* @var \Ibexa\Core\MVC\ConfigResolverInterface
* @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface
*/
private $configResolver;

Expand All @@ -34,7 +34,7 @@ final class OnlineEditorCustomAttributesExtractor implements ExtractorInterface
private $siteAccessList;

/**
* @param \Ibexa\Core\MVC\ConfigResolverInterface $configResolver
* @param \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface $configResolver
* @param string[] $siteAccessList
*/
public function __construct(ConfigResolverInterface $configResolver, array $siteAccessList)
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Configuration/Provider/AlloyEditorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
namespace Ibexa\Tests\FieldTypeRichText\Configuration\Provider;

use Ibexa\Bundle\FieldTypeRichText\DependencyInjection\Configuration\Parser\FieldType\RichText;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\FieldTypeRichText\Configuration\Provider;
use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\FieldTypeRichText\Configuration\Provider\AlloyEditor;
use Ibexa\FieldTypeRichText\Configuration\UI\Mapper\OnlineEditorConfigMapper;

Expand Down
4 changes: 2 additions & 2 deletions tests/lib/Configuration/Provider/BaseProviderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

namespace Ibexa\Tests\FieldTypeRichText\Configuration\Provider;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\FieldTypeRichText\Configuration\Provider;
use Ibexa\Core\MVC\ConfigResolverInterface;
use PHPUnit\Framework\TestCase;

abstract class BaseProviderTestCase extends TestCase
{
/** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\MVC\ConfigResolverInterface */
/** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */
protected $configResolver;

public function setUp(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Configuration/Provider/CKEditorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
namespace Ibexa\Tests\FieldTypeRichText\Configuration\Provider;

use Ibexa\Bundle\FieldTypeRichText\DependencyInjection\Configuration\Parser\FieldType\RichText;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\FieldTypeRichText\Configuration\Provider;
use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\FieldTypeRichText\Configuration\Provider\CKEditor;

final class CKEditorTest extends BaseProviderTestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/RichText/RendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo;
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Core\Base\Exceptions\NotFoundException;
use Ibexa\Core\MVC\ConfigResolverInterface;
use Ibexa\Core\Repository\Repository;
use Ibexa\FieldTypeRichText\RichText\Renderer;
use PHPUnit\Framework\TestCase;
Expand Down