From a53f7412a01f0749ea86d637a7c88e9ae53d37c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20D=C4=99bi=C5=84ski?=
<58430570+mateuszdebinski@users.noreply.github.com>
Date: Mon, 21 Aug 2023 10:12:42 +0200
Subject: [PATCH] IBX-6173: Added indexes to ezcontentobject_attribute and
ezurl_object_link tables
---
.sonarcloud.properties | 1 +
.../config/storage/legacy/schema.yaml | 2 +
.../RepositoryAuthenticationProvider.php | 6 +-
.../_fixtures/extract_content_from_rows.php | 614 +++++++++---------
.../extract_content_from_rows_result.php | 20 +-
.../Tests/FieldType/BaseIntegrationTest.php | 8 +-
6 files changed, 329 insertions(+), 322 deletions(-)
create mode 100644 .sonarcloud.properties
diff --git a/.sonarcloud.properties b/.sonarcloud.properties
new file mode 100644
index 0000000000..a6f00c520f
--- /dev/null
+++ b/.sonarcloud.properties
@@ -0,0 +1 @@
+sonar.exclusions=**/Tests/**/_fixtures/*
diff --git a/eZ/Bundle/EzPublishCoreBundle/Resources/config/storage/legacy/schema.yaml b/eZ/Bundle/EzPublishCoreBundle/Resources/config/storage/legacy/schema.yaml
index 3f13e75f72..c720ddc612 100644
--- a/eZ/Bundle/EzPublishCoreBundle/Resources/config/storage/legacy/schema.yaml
+++ b/eZ/Bundle/EzPublishCoreBundle/Resources/config/storage/legacy/schema.yaml
@@ -242,6 +242,7 @@ tables:
sort_key_string: { fields: [sort_key_string], options: { lengths: ['191'] } }
ezcontentobject_attribute_language_code: { fields: [language_code] }
sort_key_int: { fields: [sort_key_int] }
+ ezcontentobject_attribute_co_id_ver: { fields: [contentobject_id, version] }
id:
id: { type: integer, nullable: false, options: { autoincrement: true } }
version: { type: integer, nullable: false, options: { default: '0' } }
@@ -547,6 +548,7 @@ tables:
ezurl_ol_coa_id: { fields: [contentobject_attribute_id] }
ezurl_ol_url_id: { fields: [url_id] }
ezurl_ol_coa_version: { fields: [contentobject_attribute_version] }
+ ezurl_ol_coa_id_cav: { fields: [contentobject_attribute_id, contentobject_attribute_version] }
fields:
contentobject_attribute_id: { type: integer, nullable: false, options: { default: '0' } }
contentobject_attribute_version: { type: integer, nullable: false, options: { default: '0' } }
diff --git a/eZ/Publish/Core/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php b/eZ/Publish/Core/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php
index a472a33eac..2fb492c6f2 100644
--- a/eZ/Publish/Core/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php
+++ b/eZ/Publish/Core/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php
@@ -24,6 +24,8 @@ class RepositoryAuthenticationProvider extends DaoAuthenticationProvider impleme
{
use LoggerAwareTrait;
+ private const USLEEP_MULTIPLIER = 1000000;
+
/** @var float|null */
private $constantAuthTime;
@@ -114,7 +116,9 @@ private function sleepUsingConstantTimer(float $startTime): void
$remainingTime = $this->constantAuthTime - (microtime(true) - $startTime);
if ($remainingTime > 0) {
- usleep($remainingTime * 1000000);
+ $microseconds = $remainingTime * self::USLEEP_MULTIPLIER;
+
+ usleep((int)$microseconds);
} elseif ($this->logger) {
$this->logger->warning(
sprintf(
diff --git a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows.php b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows.php
index a365c8736e..fefffdb5be 100644
--- a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows.php
+++ b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows.php
@@ -1,314 +1,314 @@
[
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_is_hidden' => '0',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '4000',
- 'ezcontentobject_attribute_contentclassattribute_id' => '193',
- 'ezcontentobject_attribute_data_type_string' => 'ezkeyword',
- 'ezcontentobject_attribute_language_code' => 'eng-GB',
- 'ezcontentobject_attribute_language_id' => '4',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => null,
- 'ezcontentobject_attribute_data_text' => '',
- 'ezcontentobject_attribute_sort_key_int' => '0',
- 'ezcontentobject_attribute_sort_key_string' => '',
- 'ezcontentobject_tree_main_node_id' => '228',
- ],
- 1 => [
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '1332',
- 'ezcontentobject_attribute_contentclassattribute_id' => '183',
- 'ezcontentobject_attribute_data_type_string' => 'ezstring',
- 'ezcontentobject_attribute_language_code' => 'eng-US',
- 'ezcontentobject_attribute_language_id' => '2',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => null,
- 'ezcontentobject_attribute_data_text' => 'New test article (2)',
- 'ezcontentobject_attribute_sort_key_int' => '0',
- 'ezcontentobject_attribute_sort_key_string' => 'new test article (2)',
- 'ezcontentobject_tree_main_node_id' => '228',
- 'ezcontentobject_is_hidden' => '0',
- ],
- 2 => [
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '1333',
- 'ezcontentobject_attribute_contentclassattribute_id' => '184',
- 'ezcontentobject_attribute_data_type_string' => 'ezstring',
- 'ezcontentobject_attribute_language_code' => 'eng-US',
- 'ezcontentobject_attribute_language_id' => '2',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => null,
- 'ezcontentobject_attribute_data_text' => 'Something',
- 'ezcontentobject_attribute_sort_key_int' => '0',
- 'ezcontentobject_attribute_sort_key_string' => 'something',
- 'ezcontentobject_tree_main_node_id' => '228',
- 'ezcontentobject_is_hidden' => '0',
- ],
- 3 => [
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '1334',
- 'ezcontentobject_attribute_contentclassattribute_id' => '185',
- 'ezcontentobject_attribute_data_type_string' => 'ezauthor',
- 'ezcontentobject_attribute_language_code' => 'eng-US',
- 'ezcontentobject_attribute_language_id' => '2',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => null,
- 'ezcontentobject_attribute_data_text' => '
+ 0 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_is_hidden' => 0,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 1332,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 183,
+ 'ezcontentobject_attribute_data_type_string' => 'ezstring',
+ 'ezcontentobject_attribute_language_code' => 'eng-US',
+ 'ezcontentobject_attribute_language_id' => 2,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => null,
+ 'ezcontentobject_attribute_data_text' => 'New test article (2)',
+ 'ezcontentobject_attribute_sort_key_int' => 0,
+ 'ezcontentobject_attribute_sort_key_string' => 'new test article (2)',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ ],
+ 1 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 1333,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 184,
+ 'ezcontentobject_attribute_data_type_string' => 'ezstring',
+ 'ezcontentobject_attribute_language_code' => 'eng-US',
+ 'ezcontentobject_attribute_language_id' => 2,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => null,
+ 'ezcontentobject_attribute_data_text' => 'Something',
+ 'ezcontentobject_attribute_sort_key_int' => 0,
+ 'ezcontentobject_attribute_sort_key_string' => 'something',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ 'ezcontentobject_is_hidden' => 0,
+ ],
+ 2 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 1334,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 185,
+ 'ezcontentobject_attribute_data_type_string' => 'ezauthor',
+ 'ezcontentobject_attribute_language_code' => 'eng-US',
+ 'ezcontentobject_attribute_language_id' => 2,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => null,
+ 'ezcontentobject_attribute_data_text' => '
',
- 'ezcontentobject_attribute_sort_key_int' => '0',
- 'ezcontentobject_attribute_sort_key_string' => '',
- 'ezcontentobject_tree_main_node_id' => '228',
- 'ezcontentobject_is_hidden' => '0',
- ],
- 4 => [
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '1337',
- 'ezcontentobject_attribute_contentclassattribute_id' => '188',
- 'ezcontentobject_attribute_data_type_string' => 'ezboolean',
- 'ezcontentobject_attribute_language_code' => 'eng-US',
- 'ezcontentobject_attribute_language_id' => '2',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => '1',
- 'ezcontentobject_attribute_data_text' => '',
- 'ezcontentobject_attribute_sort_key_int' => '1',
- 'ezcontentobject_attribute_sort_key_string' => '',
- 'ezcontentobject_tree_main_node_id' => '228',
- 'ezcontentobject_is_hidden' => '0',
- ],
- 5 => [
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '1338',
- 'ezcontentobject_attribute_contentclassattribute_id' => '189',
- 'ezcontentobject_attribute_data_type_string' => 'ezimage',
- 'ezcontentobject_attribute_language_code' => 'eng-US',
- 'ezcontentobject_attribute_language_id' => '2',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => null,
- 'ezcontentobject_attribute_data_text' => '
+ 'ezcontentobject_attribute_sort_key_int' => 0,
+ 'ezcontentobject_attribute_sort_key_string' => '',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ 'ezcontentobject_is_hidden' => 0,
+ ],
+ 3 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 1337,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 188,
+ 'ezcontentobject_attribute_data_type_string' => 'ezboolean',
+ 'ezcontentobject_attribute_language_code' => 'eng-US',
+ 'ezcontentobject_attribute_language_id' => 2,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => 1,
+ 'ezcontentobject_attribute_data_text' => '',
+ 'ezcontentobject_attribute_sort_key_int' => 1,
+ 'ezcontentobject_attribute_sort_key_string' => '',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ 'ezcontentobject_is_hidden' => 0,
+ ],
+ 4 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 1338,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 189,
+ 'ezcontentobject_attribute_data_type_string' => 'ezimage',
+ 'ezcontentobject_attribute_language_code' => 'eng-US',
+ 'ezcontentobject_attribute_language_id' => 2,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => null,
+ 'ezcontentobject_attribute_data_text' => '
',
- 'ezcontentobject_attribute_sort_key_int' => '0',
- 'ezcontentobject_attribute_sort_key_string' => '',
- 'ezcontentobject_tree_main_node_id' => '228',
- 'ezcontentobject_is_hidden' => '0',
- ],
- 6 => [
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '1340',
- 'ezcontentobject_attribute_contentclassattribute_id' => '191',
- 'ezcontentobject_attribute_data_type_string' => 'ezdatetime',
- 'ezcontentobject_attribute_language_code' => 'eng-US',
- 'ezcontentobject_attribute_language_id' => '2',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => '0',
- 'ezcontentobject_attribute_data_text' => '',
- 'ezcontentobject_attribute_sort_key_int' => '0',
- 'ezcontentobject_attribute_sort_key_string' => '',
- 'ezcontentobject_tree_main_node_id' => '228',
- 'ezcontentobject_is_hidden' => '0',
- ],
- 7 => [
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '1341',
- 'ezcontentobject_attribute_contentclassattribute_id' => '192',
- 'ezcontentobject_attribute_data_type_string' => 'ezdatetime',
- 'ezcontentobject_attribute_language_code' => 'eng-US',
- 'ezcontentobject_attribute_language_id' => '2',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => '0',
- 'ezcontentobject_attribute_data_text' => '',
- 'ezcontentobject_attribute_sort_key_int' => '0',
- 'ezcontentobject_attribute_sort_key_string' => '',
- 'ezcontentobject_tree_main_node_id' => '228',
- 'ezcontentobject_is_hidden' => '0',
- ],
- 8 => [
- 'ezcontentobject_id' => '226',
- 'ezcontentobject_contentclass_id' => '16',
- 'ezcontentobject_section_id' => '1',
- 'ezcontentobject_owner_id' => '14',
- 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
- 'ezcontentobject_current_version' => '2',
- 'ezcontentobject_initial_language_id' => '2',
- 'ezcontentobject_modified' => '1313061404',
- 'ezcontentobject_published' => '1313047907',
- 'ezcontentobject_status' => '1',
- 'ezcontentobject_name' => 'Something',
- 'ezcontentobject_language_mask' => '2',
- 'ezcontentobject_version_id' => '676',
- 'ezcontentobject_version_version' => '2',
- 'ezcontentobject_version_modified' => '1313061404',
- 'ezcontentobject_version_creator_id' => '14',
- 'ezcontentobject_version_created' => '1313061317',
- 'ezcontentobject_version_status' => '1',
- 'ezcontentobject_version_language_mask' => '3',
- 'ezcontentobject_version_initial_language_id' => '2',
- 'ezcontentobject_attribute_id' => '1342',
- 'ezcontentobject_attribute_contentclassattribute_id' => '193',
- 'ezcontentobject_attribute_data_type_string' => 'ezkeyword',
- 'ezcontentobject_attribute_language_code' => 'eng-US',
- 'ezcontentobject_attribute_language_id' => '2',
- 'ezcontentobject_attribute_data_float' => '0.0',
- 'ezcontentobject_attribute_data_int' => null,
- 'ezcontentobject_attribute_data_text' => '',
- 'ezcontentobject_attribute_sort_key_int' => '0',
- 'ezcontentobject_attribute_sort_key_string' => '',
- 'ezcontentobject_tree_main_node_id' => '228',
- 'ezcontentobject_is_hidden' => '0',
- ],
-];
+ 'ezcontentobject_attribute_sort_key_int' => 0,
+ 'ezcontentobject_attribute_sort_key_string' => '',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ 'ezcontentobject_is_hidden' => 0,
+ ],
+ 5 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 1340,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 191,
+ 'ezcontentobject_attribute_data_type_string' => 'ezdatetime',
+ 'ezcontentobject_attribute_language_code' => 'eng-US',
+ 'ezcontentobject_attribute_language_id' => 2,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => 0,
+ 'ezcontentobject_attribute_data_text' => '',
+ 'ezcontentobject_attribute_sort_key_int' => 0,
+ 'ezcontentobject_attribute_sort_key_string' => '',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ 'ezcontentobject_is_hidden' => 0,
+ ],
+ 6 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 1341,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 192,
+ 'ezcontentobject_attribute_data_type_string' => 'ezdatetime',
+ 'ezcontentobject_attribute_language_code' => 'eng-US',
+ 'ezcontentobject_attribute_language_id' => 2,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => 0,
+ 'ezcontentobject_attribute_data_text' => '',
+ 'ezcontentobject_attribute_sort_key_int' => 0,
+ 'ezcontentobject_attribute_sort_key_string' => '',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ 'ezcontentobject_is_hidden' => 0,
+ ],
+ 7 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 1342,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 193,
+ 'ezcontentobject_attribute_data_type_string' => 'ezkeyword',
+ 'ezcontentobject_attribute_language_code' => 'eng-US',
+ 'ezcontentobject_attribute_language_id' => 2,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => null,
+ 'ezcontentobject_attribute_data_text' => '',
+ 'ezcontentobject_attribute_sort_key_int' => 0,
+ 'ezcontentobject_attribute_sort_key_string' => '',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ 'ezcontentobject_is_hidden' => 0,
+ ],
+ 8 => [
+ 'ezcontentobject_id' => 226,
+ 'ezcontentobject_contentclass_id' => 16,
+ 'ezcontentobject_section_id' => 1,
+ 'ezcontentobject_owner_id' => 14,
+ 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c',
+ 'ezcontentobject_current_version' => 2,
+ 'ezcontentobject_initial_language_id' => 2,
+ 'ezcontentobject_modified' => 1313061404,
+ 'ezcontentobject_published' => 1313047907,
+ 'ezcontentobject_status' => 1,
+ 'ezcontentobject_name' => 'Something',
+ 'ezcontentobject_language_mask' => 2,
+ 'ezcontentobject_version_id' => 676,
+ 'ezcontentobject_version_version' => 2,
+ 'ezcontentobject_version_modified' => 1313061404,
+ 'ezcontentobject_version_creator_id' => 14,
+ 'ezcontentobject_version_created' => 1313061317,
+ 'ezcontentobject_version_status' => 1,
+ 'ezcontentobject_version_language_mask' => 3,
+ 'ezcontentobject_version_initial_language_id' => 2,
+ 'ezcontentobject_attribute_id' => 4000,
+ 'ezcontentobject_attribute_contentclassattribute_id' => 193,
+ 'ezcontentobject_attribute_data_type_string' => 'ezkeyword',
+ 'ezcontentobject_attribute_language_code' => 'eng-GB',
+ 'ezcontentobject_attribute_language_id' => 4,
+ 'ezcontentobject_attribute_data_float' => 0.0,
+ 'ezcontentobject_attribute_data_int' => null,
+ 'ezcontentobject_attribute_data_text' => '',
+ 'ezcontentobject_attribute_sort_key_int' => 0,
+ 'ezcontentobject_attribute_sort_key_string' => '',
+ 'ezcontentobject_tree_main_node_id' => 228,
+ 'ezcontentobject_is_hidden' => 0,
+ ],
+];
\ No newline at end of file
diff --git a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows_result.php b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows_result.php
index d1859864e2..0bfc326130 100644
--- a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows_result.php
+++ b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows_result.php
@@ -39,16 +39,6 @@
$content->versionInfo = $versionInfo;
-$field = new Field();
-$field->id = 4000;
-$field->fieldDefinitionId = 193;
-$field->type = 'ezkeyword';
-$field->value = new FieldValue();
-$field->languageCode = 'eng-GB';
-$field->versionNo = 2;
-
-$content->fields[] = $field;
-
$field = new Field();
$field->id = 1332;
$field->fieldDefinitionId = 183;
@@ -129,4 +119,14 @@
$content->fields[] = $field;
+$field = new Field();
+$field->id = 4000;
+$field->fieldDefinitionId = 193;
+$field->type = 'ezkeyword';
+$field->value = new FieldValue();
+$field->languageCode = 'eng-GB';
+$field->versionNo = 2;
+
+$content->fields[] = $field;
+
return $content;
diff --git a/eZ/Publish/SPI/Tests/FieldType/BaseIntegrationTest.php b/eZ/Publish/SPI/Tests/FieldType/BaseIntegrationTest.php
index c0ca560020..396d0be03c 100644
--- a/eZ/Publish/SPI/Tests/FieldType/BaseIntegrationTest.php
+++ b/eZ/Publish/SPI/Tests/FieldType/BaseIntegrationTest.php
@@ -445,10 +445,10 @@ public function testLoadFieldType($content)
{
$this->assertSame(
$this->getTypeName(),
- $content->fields[1]->type
+ $content->fields[2]->type
);
- return $content->fields[1];
+ return $content->fields[2];
}
/**
@@ -506,10 +506,10 @@ public function testUpdateFieldType($content)
{
$this->assertSame(
$this->getTypeName(),
- $content->fields[1]->type
+ $content->fields[2]->type
);
- return $content->fields[1];
+ return $content->fields[2];
}
/**