diff --git a/src/bundle/DependencyInjection/Compiler/RichTextHtml5ConverterPass.php b/src/bundle/DependencyInjection/Compiler/RichTextHtml5ConverterPass.php index 5a6b5336..756310b4 100644 --- a/src/bundle/DependencyInjection/Compiler/RichTextHtml5ConverterPass.php +++ b/src/bundle/DependencyInjection/Compiler/RichTextHtml5ConverterPass.php @@ -22,16 +22,16 @@ class RichTextHtml5ConverterPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { - if ($container->hasDefinition('ezrichtext.converter.output.xhtml5')) { - $html5OutputConverterDefinition = $container->getDefinition('ezrichtext.converter.output.xhtml5'); + if ($container->hasDefinition('ibexa.richtext.converter.output.xhtml5')) { + $html5OutputConverterDefinition = $container->getDefinition('ibexa.richtext.converter.output.xhtml5'); $taggedOutputServiceIds = $container->findTaggedServiceIds( 'ibexa.field_type.richtext.converter.output.xhtml5' ); $this->setConverterDefinitions($taggedOutputServiceIds, $html5OutputConverterDefinition); } - if ($container->hasDefinition('ezrichtext.converter.input.xhtml5')) { - $html5InputConverterDefinition = $container->getDefinition('ezrichtext.converter.input.xhtml5'); + if ($container->hasDefinition('ibexa.richtext.converter.input.xhtml5')) { + $html5InputConverterDefinition = $container->getDefinition('ibexa.richtext.converter.input.xhtml5'); $taggedInputServiceIds = $container->findTaggedServiceIds( 'ibexa.field_type.richtext.converter.input.xhtml5' ); diff --git a/src/bundle/Resources/config/fieldtype_services.yaml b/src/bundle/Resources/config/fieldtype_services.yaml index b436bd98..400b747d 100644 --- a/src/bundle/Resources/config/fieldtype_services.yaml +++ b/src/bundle/Resources/config/fieldtype_services.yaml @@ -16,26 +16,26 @@ parameters: - '%ezrichtext.resources%/schemas/ezxhtml5/output/ezxhtml5.xsd' services: - ezrichtext.normalizer.input: + Ibexa\FieldTypeRichText\RichText\Normalizer\DocumentTypeDefinition: class: Ibexa\FieldTypeRichText\RichText\Normalizer\DocumentTypeDefinition arguments: - 'section' - 'http://ez.no/namespaces/ezpublish5/xhtml5/edit' - '%ezrichtext.resources%/dtd/ezxhtml5_edit_html_character_entities.dtd' - ezrichtext.converter.input.dispatcher: + Ibexa\FieldTypeRichText\RichText\ConverterDispatcher: class: Ibexa\FieldTypeRichText\RichText\ConverterDispatcher arguments: - http://docbook.org/ns/docbook: null - http://ez.no/namespaces/ezpublish5/xhtml5/edit: '@ezrichtext.converter.input.xhtml5' + http://ez.no/namespaces/ezpublish5/xhtml5/edit: '@ibexa.richtext.converter.input.xhtml5' - ezrichtext.renderer: + Ibexa\FieldTypeRichText\RichText\Renderer: class: Ibexa\FieldTypeRichText\RichText\Renderer arguments: - - '@ezpublish.api.repository' + - '@ibexa.api.repository' - '@security.authorization_checker' - - '@ezpublish.config.resolver' + - '@ibexa.config.resolver' - '@twig' - '%ezrichtext.tag.namespace%' - '%ezrichtext.style.namespace%' @@ -44,32 +44,32 @@ services: - '%ezplatform.ezrichtext.custom_tags%' - '%ezplatform.ezrichtext.custom_styles%' - ezrichtext.converter.link: + Ibexa\FieldTypeRichText\RichText\Converter\Link: class: Ibexa\FieldTypeRichText\RichText\Converter\Link - arguments: ['@ezpublish.api.service.location', '@ezpublish.api.service.content', '@ezpublish.urlalias_router', '@?logger'] + arguments: ['@ibexa.api.service.location', '@ibexa.api.service.content', '@Ibexa\Bundle\Core\Routing\UrlAliasRouter', '@?logger'] tags: - {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 0} - ezrichtext.converter.template: + Ibexa\FieldTypeRichText\RichText\Converter\Render\Template: class: Ibexa\FieldTypeRichText\RichText\Converter\Render\Template arguments: - - '@ezrichtext.renderer' - - '@ezrichtext.converter.output.xhtml5' + - '@Ibexa\FieldTypeRichText\RichText\Renderer' + - '@ibexa.richtext.converter.output.xhtml5' - '@?logger' tags: - {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 10} lazy: true - ezrichtext.converter.embed: + Ibexa\FieldTypeRichText\RichText\Converter\Render\Embed: class: Ibexa\FieldTypeRichText\RichText\Converter\Render\Embed arguments: - - '@ezrichtext.renderer' + - '@Ibexa\FieldTypeRichText\RichText\Renderer' - '@?logger' tags: - {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 10} # Note: should typically be the last one as it produces embeddable fragment - ezrichtext.converter.output.xhtml5.fragment: + Ibexa\FieldTypeRichText\RichText\Converter\Xslt: class: Ibexa\FieldTypeRichText\RichText\Converter\Xslt arguments: ['%ezrichtext.converter.output.xhtml5.fragment.resources%'] tags: @@ -77,71 +77,71 @@ services: # Aggregate converter for XHTML5 output that other converters register to # through service tags. - ezrichtext.converter.output.xhtml5: + ibexa.richtext.converter.output.xhtml5: class: Ibexa\FieldTypeRichText\RichText\Converter\Aggregate lazy: true - ezrichtext.validator.input.ezxhtml5: + Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate: class: Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate arguments: [!tagged ibexa.field_type.richtext.validator.input.xhtml5] - ezrichtext.validator.docbook: + ibexa.richtext.validator.docbook: class: Ibexa\FieldTypeRichText\RichText\Validator\Validator arguments: ['%ezrichtext.validator.docbook.resources%'] tags: - { name: ibexa.field_type.richtext.validator.input.xhtml5 } - ezrichtext.validator.output.ezxhtml5: + ibexa.richtext.validator.output.ezxhtml5: class: Ibexa\FieldTypeRichText\RichText\Validator\Validator arguments: ['%ezrichtext.validator.output.ezxhtml5.resources%'] - ezrichtext.validator.input.dispatcher: + Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher: class: Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher arguments: - http://docbook.org/ns/docbook: null http://ez.no/namespaces/ezpublish5/xhtml5/edit: null - http://ez.no/namespaces/ezpublish5/xhtml5: '@ezrichtext.validator.output.ezxhtml5' + http://ez.no/namespaces/ezpublish5/xhtml5: '@ibexa.richtext.validator.output.ezxhtml5' - ezrichtext.validator.internal_link: + Ibexa\FieldTypeRichText\RichText\Validator\InternalLinkValidator: class: Ibexa\FieldTypeRichText\RichText\Validator\InternalLinkValidator arguments: - - '@ezpublish.spi.persistence.cache.contentHandler' - - '@ezpublish.spi.persistence.cache.locationHandler' + - '@Ibexa\Core\Persistence\Cache\ContentHandler' + - '@Ibexa\Core\Persistence\Cache\LocationHandler' tags: - { name: ibexa.field_type.richtext.validator.input.xhtml5 } - ezrichtext.converter.output.xhtml5.core: + Ibexa\FieldTypeRichText\RichText\Converter\Html5: class: Ibexa\FieldTypeRichText\RichText\Converter\Html5 arguments: - '%ezrichtext.converter.output.xhtml5.resources%' - - '@ezpublish.config.resolver' + - '@ibexa.config.resolver' tags: - {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 50} # Aggregate converter for XHTML5 input that other converters register to # through 'ibexa.field_type.richtext.converter.input.xhtml5' service tag. - ezrichtext.converter.input.xhtml5: + ibexa.richtext.converter.input.xhtml5: class: Ibexa\FieldTypeRichText\RichText\Converter\Aggregate lazy: true - ezrichtext.converter.input.xhtml5.core: + Ibexa\FieldTypeRichText\RichText\Converter\Html5Input: class: Ibexa\FieldTypeRichText\RichText\Converter\Html5Input arguments: - '%ezrichtext.converter.input.xhtml5.resources%' - - '@ezpublish.config.resolver' + - '@ibexa.config.resolver' tags: - {name: ibexa.field_type.richtext.converter.input.xhtml5, priority: 50} # Note: should run before xsl transformation - ezrichtext.converter.input.xhtml5.programlisting: + Ibexa\FieldTypeRichText\RichText\Converter\ProgramListing: class: Ibexa\FieldTypeRichText\RichText\Converter\ProgramListing tags: - {name: ibexa.field_type.richtext.converter.input.xhtml5, priority: 10} - ezrichtext.converter.edit.xhtml5: + Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit: class: Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit arguments: - '%ezrichtext.converter.edit.xhtml5.resources%' - - '@ezpublish.config.resolver' + - '@ibexa.config.resolver' diff --git a/src/bundle/Resources/config/form.yaml b/src/bundle/Resources/config/form.yaml index a9621570..ba37f313 100644 --- a/src/bundle/Resources/config/form.yaml +++ b/src/bundle/Resources/config/form.yaml @@ -6,12 +6,12 @@ services: Ibexa\FieldTypeRichText\Form\Type\RichTextFieldType: arguments: - $docbookToXhtml5EditConverter: '@ezrichtext.converter.edit.xhtml5' - $fieldTypeService: '@ezpublish.api.service.field_type' + $docbookToXhtml5EditConverter: '@Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit' + $fieldTypeService: '@ibexa.api.service.field_type' Ibexa\FieldTypeRichText\Form\Type\RichTextType: arguments: - $docbookToXhtml5EditConverter: '@ezrichtext.converter.edit.xhtml5' + $docbookToXhtml5EditConverter: '@Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit' Ibexa\FieldTypeRichText\Validator\Constraints\RichTextValidator: tags: diff --git a/src/bundle/Resources/config/rest.yaml b/src/bundle/Resources/config/rest.yaml index 26473137..7aae8148 100644 --- a/src/bundle/Resources/config/rest.yaml +++ b/src/bundle/Resources/config/rest.yaml @@ -6,6 +6,6 @@ services: Ibexa\FieldTypeRichText\REST\FieldTypeProcessor\RichTextProcessor: arguments: - - '@ezrichtext.converter.edit.xhtml5' + - '@Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit' tags: - { name: ibexa.rest.field_type.processor, alias: ezrichtext } diff --git a/src/bundle/Resources/config/settings/fieldtype_services.yaml b/src/bundle/Resources/config/settings/fieldtype_services.yaml index 7b23883a..f2307620 100644 --- a/src/bundle/Resources/config/settings/fieldtype_services.yaml +++ b/src/bundle/Resources/config/settings/fieldtype_services.yaml @@ -7,37 +7,37 @@ services: autoconfigure: true public: false - ezrichtext.converter.input.dispatcher: + Ibexa\FieldTypeRichText\RichText\ConverterDispatcher: class: Ibexa\FieldTypeRichText\RichText\ConverterDispatcher arguments: - http://docbook.org/ns/docbook: null - ezrichtext.validator.input.ezxhtml5: + Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate: class: Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate arguments: [!tagged ibexa.field_type.richtext.validator.input.xhtml5] - ezrichtext.validator.docbook: + ibexa.richtext.validator.docbook: class: Ibexa\FieldTypeRichText\RichText\Validator\Validator arguments: ['%ezrichtext.validator.docbook.resources%'] tags: - { name: ibexa.field_type.richtext.validator.input.xhtml5 } - ezrichtext.validator.input.dispatcher: + Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher: class: Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher arguments: - http://docbook.org/ns/docbook: null - ezrichtext.validator.internal_link: + Ibexa\FieldTypeRichText\RichText\Validator\InternalLinkValidator: class: Ibexa\FieldTypeRichText\RichText\Validator\InternalLinkValidator arguments: - - '@ezpublish.spi.persistence.cache.contentHandler' - - '@ezpublish.spi.persistence.cache.locationHandler' + - '@Ibexa\Core\Persistence\Cache\ContentHandler' + - '@Ibexa\Core\Persistence\Cache\LocationHandler' tags: - { name: ibexa.field_type.richtext.validator.input.xhtml5 } - ezrichtext.normalizer.input: + Ibexa\FieldTypeRichText\RichText\Normalizer\DocumentTypeDefinition: class: Ibexa\FieldTypeRichText\RichText\Normalizer\Aggregate # Symfony 3.4+ service definitions: @@ -56,10 +56,10 @@ services: Ibexa\FieldTypeRichText\RichText\InputHandler: arguments: - '@Ibexa\FieldTypeRichText\RichText\DOMDocumentFactory' - - '@ezrichtext.converter.input.dispatcher' - - '@ezrichtext.normalizer.input' - - '@ezrichtext.validator.input.dispatcher' - - '@ezrichtext.validator.input.ezxhtml5' + - '@Ibexa\FieldTypeRichText\RichText\ConverterDispatcher' + - '@Ibexa\FieldTypeRichText\RichText\Normalizer\DocumentTypeDefinition' + - '@Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher' + - '@Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate' - '@Ibexa\FieldTypeRichText\RichText\RelationProcessor' # Default InputHandler diff --git a/src/bundle/Resources/config/settings/fieldtypes.yaml b/src/bundle/Resources/config/settings/fieldtypes.yaml index e7e65f41..00c90930 100644 --- a/src/bundle/Resources/config/settings/fieldtypes.yaml +++ b/src/bundle/Resources/config/settings/fieldtypes.yaml @@ -1,7 +1,7 @@ services: Ibexa\FieldTypeRichText\FieldType\RichText\Type: public: true # @todo should be private - parent: ezpublish.fieldType + parent: Ibexa\Core\FieldType\FieldType arguments: - '@Ibexa\FieldTypeRichText\RichText\InputHandler' tags: diff --git a/src/bundle/Resources/config/settings/storage_engines/legacy/external_storage_gateways.yaml b/src/bundle/Resources/config/settings/storage_engines/legacy/external_storage_gateways.yaml index 36ebbdbd..7befe29f 100644 --- a/src/bundle/Resources/config/settings/storage_engines/legacy/external_storage_gateways.yaml +++ b/src/bundle/Resources/config/settings/storage_engines/legacy/external_storage_gateways.yaml @@ -6,5 +6,5 @@ services: Ibexa\FieldTypeRichText\FieldType\RichText\RichTextStorage\Gateway\DoctrineStorage: arguments: - - '@ezpublish.fieldType.ezurl.storage_gateway' - - '@ezpublish.api.storage_engine.legacy.connection' + - '@Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage' + - '@ibexa.api.storage_engine.legacy.connection' diff --git a/src/bundle/Resources/config/templating.yaml b/src/bundle/Resources/config/templating.yaml index 13e3ea57..42d26faf 100644 --- a/src/bundle/Resources/config/templating.yaml +++ b/src/bundle/Resources/config/templating.yaml @@ -6,8 +6,8 @@ services: Ibexa\Bundle\FieldTypeRichText\Templating\Twig\Extension\RichTextConverterExtension: arguments: - $richTextOutputConverter: '@ezrichtext.converter.output.xhtml5' - $richTextEditConverter: '@ezrichtext.converter.edit.xhtml5' + $richTextOutputConverter: '@ibexa.richtext.converter.output.xhtml5' + $richTextEditConverter: '@Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit' Ibexa\Bundle\FieldTypeRichText\Templating\Twig\Extension\YoutubeIdExtractorExtension: ~ diff --git a/src/bundle/Resources/views/RichText/embed/content.html.twig b/src/bundle/Resources/views/RichText/embed/content.html.twig index 7670b4aa..b4548916 100644 --- a/src/bundle/Resources/views/RichText/embed/content.html.twig +++ b/src/bundle/Resources/views/RichText/embed/content.html.twig @@ -19,7 +19,7 @@ {{ render( controller( - "ez_content:embedAction", + "ibexa_content:embedAction", { "contentId": embedParams.id, "viewType": embedParams.viewType, diff --git a/src/bundle/Resources/views/RichText/embed/content_inline.html.twig b/src/bundle/Resources/views/RichText/embed/content_inline.html.twig index 3779fbec..db19daab 100644 --- a/src/bundle/Resources/views/RichText/embed/content_inline.html.twig +++ b/src/bundle/Resources/views/RichText/embed/content_inline.html.twig @@ -17,7 +17,7 @@ {{ render( controller( - "ez_content:viewAction", + "ibexa_content:viewAction", { "contentId": embedParams.id, "viewType": embedParams.viewType, diff --git a/src/bundle/Resources/views/RichText/embed/location.html.twig b/src/bundle/Resources/views/RichText/embed/location.html.twig index 815a45d2..e2ee4e94 100644 --- a/src/bundle/Resources/views/RichText/embed/location.html.twig +++ b/src/bundle/Resources/views/RichText/embed/location.html.twig @@ -18,7 +18,7 @@ {{ render( controller( - "ez_content:viewAction", + "ibexa_content:viewAction", { "locationId": embedParams.id, "viewType": embedParams.viewType, diff --git a/src/bundle/Resources/views/RichText/embed/location_inline.html.twig b/src/bundle/Resources/views/RichText/embed/location_inline.html.twig index 57486bc3..40ff7c78 100644 --- a/src/bundle/Resources/views/RichText/embed/location_inline.html.twig +++ b/src/bundle/Resources/views/RichText/embed/location_inline.html.twig @@ -17,7 +17,7 @@ {{ render( controller( - "ez_content:viewAction", + "ibexa_content:viewAction", { "locationId": embedParams.id, "viewType": embedParams.viewType, diff --git a/tests/bundle/DependencyInjection/Compiler/RichTextHtml5ConverterPassTest.php b/tests/bundle/DependencyInjection/Compiler/RichTextHtml5ConverterPassTest.php index 92d9e344..da152f37 100644 --- a/tests/bundle/DependencyInjection/Compiler/RichTextHtml5ConverterPassTest.php +++ b/tests/bundle/DependencyInjection/Compiler/RichTextHtml5ConverterPassTest.php @@ -33,7 +33,7 @@ public function testCollectProviders() { $configurationResolver = new Definition(); $this->setDefinition( - 'ezrichtext.converter.output.xhtml5', + 'ibexa.richtext.converter.output.xhtml5', $configurationResolver ); @@ -56,7 +56,7 @@ public function testCollectProviders() $this->compile(); $this->assertContainerBuilderHasServiceDefinitionWithArgument( - 'ezrichtext.converter.output.xhtml5', + 'ibexa.richtext.converter.output.xhtml5', 0, [ new Reference('ezrichtext.converter.test1'), diff --git a/tests/integration/Repository/SetupFactory/CoreSetupFactoryTrait.php b/tests/integration/Repository/SetupFactory/CoreSetupFactoryTrait.php index fc89c576..9f46399c 100644 --- a/tests/integration/Repository/SetupFactory/CoreSetupFactoryTrait.php +++ b/tests/integration/Repository/SetupFactory/CoreSetupFactoryTrait.php @@ -81,7 +81,7 @@ protected function loadCoreSettings(ContainerBuilder $containerBuilder) ->addMethodCall('connect', [(getenv('CACHE_HOST') ?: '127.0.0.1'), 6379, 2.5]); $containerBuilder - ->register('ezpublish.cache_pool.driver', RedisAdapter::class) + ->register('ibexa.cache_pool.driver', RedisAdapter::class) ->setArguments([new Reference('ezpublish.cache_pool.driver.redis'), '', 120]); }