diff --git a/.github/actions/composer-install/action.yaml b/.github/actions/composer-install/action.yaml
new file mode 100644
index 00000000..fc74dc12
--- /dev/null
+++ b/.github/actions/composer-install/action.yaml
@@ -0,0 +1,14 @@
+name: 'Install Composer dependencies'
+description: 'Set Composer root version from branch alias and install dependencies'
+runs:
+ using: "composite"
+ steps:
+ - run: |
+ version=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json)
+ echo "version=$version" >> $GITHUB_ENV
+ shell: bash
+ - uses: ramsey/composer-install@v2
+ with:
+ dependency-versions: "highest"
+ env:
+ COMPOSER_ROOT_VERSION: ${{ env.version }}
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index adea2f62..c8e6ec2d 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -26,9 +26,7 @@ jobs:
extensions: 'pdo_sqlite, gd'
tools: cs2pr
- - uses: ramsey/composer-install@v2
- with:
- dependency-versions: highest
+ - uses: ./.github/actions/composer-install
- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr
@@ -57,9 +55,7 @@ jobs:
extensions: pdo_sqlite, gd
tools: cs2pr
- - uses: ramsey/composer-install@v2
- with:
- dependency-versions: highest
+ - uses: ./.github/actions/composer-install
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
@@ -109,9 +105,7 @@ jobs:
extensions: pdo_pgsql, gd
tools: cs2pr
- - uses: ramsey/composer-install@v2
- with:
- dependency-versions: highest
+ - uses: ./.github/actions/composer-install
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
@@ -162,9 +156,7 @@ jobs:
extensions: pdo_mysql, gd
tools: cs2pr
- - uses: ramsey/composer-install@v2
- with:
- dependency-versions: highest
+ - uses: ./.github/actions/composer-install
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
@@ -201,9 +193,7 @@ jobs:
php-version: 7.4
coverage: none
- - uses: ramsey/composer-install@v2
- with:
- dependency-versions: highest
+ - uses: ./.github/actions/composer-install
- name: Run integration test suite
run: composer integration-solr
diff --git a/composer.json b/composer.json
index e3a9f53e..1265bcbd 100644
--- a/composer.json
+++ b/composer.json
@@ -32,14 +32,18 @@
},
"require-dev": {
"dama/doctrine-test-bundle": "^6.7.5",
+ "ibexa/admin-ui": "~4.6.x-dev",
"ibexa/ci-scripts": "^0.2@dev",
- "ibexa/doctrine-schema": "~4.6.0@dev",
- "ibexa/solr": "~4.6.0@dev",
+ "ibexa/doctrine-schema": "~4.6.x-dev",
+ "ibexa/search": "~4.6.x-dev",
+ "ibexa/solr": "~4.6.x-dev",
+ "ibexa/test-core": "~4.6.x-dev",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-symfony": "^1.2",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.5",
"symfony/finder": "^5.0",
+ "symfony/notifier": "^5.4",
"symfony/proxy-manager-bridge": "^5.3",
"matthiasnoback/symfony-config-test": "^4.1",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
diff --git a/phpunit-integration.xml b/phpunit-integration.xml
index 5efc01b5..007506d0 100644
--- a/phpunit-integration.xml
+++ b/phpunit-integration.xml
@@ -13,6 +13,9 @@
tests/integration/Persistence
+
+ tests/integration/TranslationTest.php
+
diff --git a/src/bundle/Resources/translations/alloy_editor.en.xliff b/src/bundle/Resources/translations/alloy_editor.en.xliff
deleted file mode 100644
index d4cee13f..00000000
--- a/src/bundle/Resources/translations/alloy_editor.en.xliff
+++ /dev/null
@@ -1,256 +0,0 @@
-
-
-
-
-
- The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.
-
-
-
- Anchor name must be unique.
- Anchor name must be unique.
- key: anchor_btn.error.unique
-
-
- A valid anchor link is needed.
- A valid anchor link is needed.
- key: anchor_btn.error.valid
-
-
- Anchor
- Anchor
- key: anchor_btn.label
-
-
- Remove
- Remove
- key: anchor_edit.btn.remove.title
-
-
- Save
- Save
- key: anchor_edit.btn.save.title
-
-
- Name:
- Name:
- key: anchor_edit.input.label
-
-
- Center
- Center
- key: block_text_align_center_btn.label
-
-
- Justify
- Justify
- key: blocktext_align_justify_btn.label
-
-
- Left
- Left
- key: blocktext_align_left_btn.label
-
-
- Right
- Right
- key: blocktext_align_right_btn.label
-
-
- Save
- Save
- key: custom_attributes_update_btn.save_btn.label
-
-
- Cancel
- Cancel
- key: custom_tag_update_btn.cancel_btn.label
-
-
- Save
- Save
- key: custom_tag_update_btn.save_btn.label
-
-
- This embedded item relies on 'ezlocation' imported from Legacy. It isn't supported by Online Editor yet.
- This embedded item relies on 'ezlocation' imported from Legacy. It isn't supported by Online Editor yet.
- key: embed.ezlocation.error
-
-
- Center
- Center
- key: embed_align_center_btn.label
-
-
- Left
- Left
- key: embed_align_left_btn.label
-
-
- Right
- Right
- key: embed_align_right_btn.label
-
-
- Embed
- Embed
- key: embed_btn.label
-
-
- Select a Content item to embed
- Select a Content item to embed
- key: embed_btn.udw.title
-
-
- Select another Content item
- Select another Content item
- key: embed_update_btn.label
-
-
- Select a Content item to embed
- Select a Content item to embed
- key: embed_update_btn.udw.title
-
-
- Heading
- Heading
- key: heading_btn.label
-
-
- Image
- Image
- key: image_btn.label
-
-
- Select an image
- Select an image
- key: image_btn.udw.label
-
-
- Select another image
- Select another image
- key: image_update_btn.label
-
-
- Select an image
- Select an image
- key: image_update_btn.udw.title
-
-
- Remove
- Remove
- key: link_edit_btn.action_row.remove
-
-
- Save
- Save
- key: link_edit_btn.action_row.save
-
-
- Type or paste link here
- Type or paste link here
- key: link_edit_btn.button_row.block.placeholder.text
-
-
- Link to:
- Link to:
- key: link_edit_btn.button_row.link_to
-
-
- Select:
- Select:
- key: link_edit_btn.button_row.select
-
-
- Select content
- Select content
- key: link_edit_btn.button_row.select_content
-
-
- or
- or
- key: link_edit_btn.button_row.separator
-
-
- New tab
- New tab
- key: link_edit_btn.info_row.new_tab
-
-
- Open in:
- Open in:
- key: link_edit_btn.info_row.open_in.label
-
-
- Same tab
- Same tab
- key: link_edit_btn.info_row.same_tab
-
-
- Title:
- Title:
- key: link_edit_btn.info_row.title
-
-
- Select content
- Select content
- key: link_edit_btn.udw.title
-
-
- Move down
- Move down
- key: move_down_btn.title
-
-
- Move up
- Move up
- key: move_up_btn.title
-
-
- List
- List
- key: ordered_list_btn.label
-
-
- Paragraph
- Paragraph
- key: paragraph_btn.label
-
-
- Remove block
- Remove block
- key: remove_block_btn.title
-
-
- Removed
- Removed
- key: removed_content.label
-
-
- Table
- Table
- key: table_btn.label
-
-
- Formatted
- Formatted
- key: toolbar_config_base.formatted_label
-
-
- Heading
- Heading
- key: toolbar_config_base.heading_label
-
-
- Paragraph
- Paragraph
- key: toolbar_config_base.paragraph_label
-
-
- List
- List
- key: unordered_list_btn.label
-
-
-
-
diff --git a/src/bundle/Resources/translations/ck_editor.en.xliff b/src/bundle/Resources/translations/ck_editor.en.xliff
index ffc67bf3..dde9ba26 100644
--- a/src/bundle/Resources/translations/ck_editor.en.xliff
+++ b/src/bundle/Resources/translations/ck_editor.en.xliff
@@ -8,12 +8,12 @@
Anchor name must be unique.
- Anchor name must be unique.
+ Anchor name must be unique.
key: anchor_btn.error.unique
A valid anchor link is needed.
- A valid anchor link is needed.
+ A valid anchor link is needed.
key: anchor_btn.error.valid
diff --git a/src/bundle/Resources/translations/custom_tags.en.xliff b/src/bundle/Resources/translations/custom_tags.en.xliff
deleted file mode 100644
index 6cc6aa3a..00000000
--- a/src/bundle/Resources/translations/custom_tags.en.xliff
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
- The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.
-
-
-
- Post URL
- Post URL
- key: ezrichtext.custom_tags.ezfacebook.attributes.post_url.label
-
-
- Width
- Width
- key: ezrichtext.custom_tags.ezfacebook.attributes.width.label
-
-
- Add a Facebook post
- Add a Facebook post
- key: ezrichtext.custom_tags.ezfacebook.description
-
-
- Facebook
- Facebook
- key: ezrichtext.custom_tags.ezfacebook.label
-
-
- Cards
- Cards
- key: ezrichtext.custom_tags.eztwitter.attributes.cards.label
-
-
- Conversation
- Conversation
- key: ezrichtext.custom_tags.eztwitter.attributes.conversation.label
-
-
- DNT
- DNT
- key: ezrichtext.custom_tags.eztwitter.attributes.dnt.label
-
-
- Lang
- Lang
- key: ezrichtext.custom_tags.eztwitter.attributes.lang.label
-
-
- Link color
- Link color
- key: ezrichtext.custom_tags.eztwitter.attributes.link_color.label
-
-
- Theme
- Theme
- key: ezrichtext.custom_tags.eztwitter.attributes.theme.label
-
-
- Tweet URL
- Tweet URL
- key: ezrichtext.custom_tags.eztwitter.attributes.tweet_url.label
-
-
- Width
- Width
- key: ezrichtext.custom_tags.eztwitter.attributes.width.label
-
-
- Add a tweet
- Add a tweet
- key: ezrichtext.custom_tags.eztwitter.description
-
-
- Twitter
- Twitter
- key: ezrichtext.custom_tags.eztwitter.label
-
-
- Autoplay
- Autoplay
- key: ezrichtext.custom_tags.ezyoutube.attributes.autoplay.label
-
-
- Height
- Height
- key: ezrichtext.custom_tags.ezyoutube.attributes.height.label
-
-
- Title
- Title
- key: ezrichtext.custom_tags.ezyoutube.attributes.title.label
-
-
- Video URL
- Video URL
- key: ezrichtext.custom_tags.ezyoutube.attributes.video_url.label
-
-
- Width
- Width
- key: ezrichtext.custom_tags.ezyoutube.attributes.width.label
-
-
- Add a YouTube video
- Add a YouTube video
- key: ezrichtext.custom_tags.ezyoutube.description
-
-
- YouTube
- YouTube
- key: ezrichtext.custom_tags.ezyoutube.label
-
-
-
-
diff --git a/src/bundle/Resources/translations/online_editor.en.xliff b/src/bundle/Resources/translations/online_editor.en.xliff
deleted file mode 100644
index 85af1b5b..00000000
--- a/src/bundle/Resources/translations/online_editor.en.xliff
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
- The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.
-
-
-
- Custom Classes
- Custom Classes
- key: ezrichtext.classes.class.label
-
-
-
-
diff --git a/tests/integration/IbexaTestKernel.php b/tests/integration/IbexaTestKernel.php
index 1d3b9f12..1c26428a 100644
--- a/tests/integration/IbexaTestKernel.php
+++ b/tests/integration/IbexaTestKernel.php
@@ -9,12 +9,28 @@
namespace Ibexa\Tests\Integration\FieldTypeRichText;
use DAMA\DoctrineTestBundle\DAMADoctrineTestBundle;
+use Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle;
+use Ibexa\Bundle\AdminUi\IbexaAdminUiBundle;
+use Ibexa\Bundle\ContentForms\IbexaContentFormsBundle;
+use Ibexa\Bundle\DesignEngine\IbexaDesignEngineBundle;
use Ibexa\Bundle\FieldTypeRichText\IbexaFieldTypeRichTextBundle;
-use Ibexa\Contracts\Core\Test\IbexaTestKernel as BaseIbexaTestKernel;
+use Ibexa\Bundle\Notifications\IbexaNotificationsBundle;
+use Ibexa\Bundle\Rest\IbexaRestBundle;
+use Ibexa\Bundle\Search\IbexaSearchBundle;
+use Ibexa\Bundle\User\IbexaUserBundle;
use Ibexa\Contracts\FieldTypeRichText\Persistence\Legacy\MigrateRichTextNamespaces\GatewayInterface;
+use Ibexa\Contracts\Test\Core\IbexaTestKernel as BaseIbexaTestKernel;
use Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface;
+use Knp\Bundle\MenuBundle\KnpMenuBundle;
+use Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle;
+use Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle;
use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface;
use Symfony\Component\Config\Loader\LoaderInterface;
+use Symfony\Component\Config\Resource\FileResource;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\Notifier\NotifierInterface;
+use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;
final class IbexaTestKernel extends BaseIbexaTestKernel
{
@@ -22,6 +38,20 @@ public function registerBundles(): iterable
{
yield from parent::registerBundles();
+ yield new LexikJWTAuthenticationBundle();
+ yield new HautelookTemplatedUriBundle();
+ yield new WebpackEncoreBundle();
+ yield new SwiftmailerBundle();
+ yield new KnpMenuBundle();
+
+ yield new IbexaRestBundle();
+ yield new IbexaContentFormsBundle();
+ yield new IbexaSearchBundle();
+ yield new IbexaUserBundle();
+ yield new IbexaDesignEngineBundle();
+ yield new IbexaAdminUiBundle();
+ yield new IbexaNotificationsBundle();
+
yield new IbexaFieldTypeRichTextBundle();
yield new DAMADoctrineTestBundle();
}
@@ -42,10 +72,25 @@ protected static function getExposedServicesById(): iterable
yield 'ibexa.cache_pool' => TagAwareAdapterInterface::class;
}
- protected function loadConfiguration(LoaderInterface $loader): void
+ public function registerContainerConfiguration(LoaderInterface $loader): void
{
- parent::loadConfiguration($loader);
+ parent::registerContainerConfiguration($loader);
- $loader->load(dirname(__DIR__) . '/lib/_settings/common.yaml');
+ $loader->load(__DIR__ . '/../lib/_settings/common.yaml');
+ $loader->load(__DIR__ . '/Resources/config.yaml');
+ $loader->load(static function (ContainerBuilder $container): void {
+ $container->setDefinition(
+ 'Symfony\Component\Notifier\NotifierInterface',
+ new Definition(NotifierInterface::class)
+ );
+ $resource = new FileResource(__DIR__ . '/Resources/routing.yaml');
+ $container->addResource($resource);
+ $container->setParameter('form.type_extension.csrf.enabled', false);
+ $container->loadFromExtension('framework', [
+ 'router' => [
+ 'resource' => $resource->getResource(),
+ ],
+ ]);
+ });
}
}
diff --git a/tests/integration/Resources/config.yaml b/tests/integration/Resources/config.yaml
new file mode 100644
index 00000000..60ae5ec2
--- /dev/null
+++ b/tests/integration/Resources/config.yaml
@@ -0,0 +1,23 @@
+parameters:
+ locale_fallback: en
+
+webpack_encore:
+ # The path where Encore is building the assets - i.e. Encore.setOutputPath()
+ output_path: '%kernel.project_dir%/public/build'
+
+lexik_jwt_authentication:
+ secret_key: 'foo'
+
+ibexa:
+ repositories:
+ default:
+ search:
+ engine: '%env(SEARCH_ENGINE)%'
+ connection: default
+
+ system:
+ default:
+ languages:
+ - eng-US
+ - eng-GB
+ - ger-DE
diff --git a/tests/integration/Resources/routing.yaml b/tests/integration/Resources/routing.yaml
new file mode 100644
index 00000000..2956445d
--- /dev/null
+++ b/tests/integration/Resources/routing.yaml
@@ -0,0 +1,2 @@
+ibexa.user.default_profile_image.initials:
+ path: /user/default_profile_image/initials.svg
diff --git a/tests/integration/TranslationTest.php b/tests/integration/TranslationTest.php
new file mode 100644
index 00000000..ed02c7d9
--- /dev/null
+++ b/tests/integration/TranslationTest.php
@@ -0,0 +1,19 @@
+