Loading CHANGELOG.txt +3 −1 Original line number Diff line number Diff line Search API 1.x, dev (xxxx-xx-xx): --------------------------------- - #3247781 (follow-up) by drunken monkey: Fixed missing update for Task entity storage schema. Search API 1.22 (2022-01-12): ----------------------------- Loading search_api.install +12 −1 Original line number Diff line number Diff line Loading @@ -8,9 +8,10 @@ use Drupal\Component\Render\FormattableMarkup; use Drupal\Component\Render\MarkupInterface; use Drupal\Core\Database\DatabaseException; use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema; use Drupal\Core\Link; use Drupal\search_api\Entity\Server; use Drupal\Core\Url; use Drupal\search_api\Entity\Server; use Drupal\search_api\Entity\TaskStorageSchema; /** Loading Loading @@ -398,3 +399,13 @@ function search_api_update_8109(): MarkupInterface { return t('Enabled "Track changes in referenced entities" on all existing search indexes.'); } /** * Remove the unique index from the task entity type's storage. */ function search_api_update_8110() { $manager = \Drupal::entityDefinitionUpdateManager(); $entity_type = $manager->getEntityType('search_api_task'); $entity_type->setHandlerClass('storage_schema', SqlContentEntityStorageSchema::class); $manager->updateEntityType($entity_type); } src/Entity/Task.php +0 −3 Original line number Diff line number Diff line Loading @@ -27,9 +27,6 @@ use Drupal\search_api\Task\TaskInterface; * entity_keys = { * "id" = "id", * }, * handlers = { * "storage_schema" = "Drupal\search_api\Entity\TaskStorageSchema", * }, * ) */ class Task extends ContentEntityBase implements TaskInterface { Loading src/Entity/TaskStorageSchema.php +7 −0 Original line number Diff line number Diff line Loading @@ -2,11 +2,18 @@ namespace Drupal\search_api\Entity; @trigger_error('\Drupal\search_api\Entity\TaskStorageSchema is deprecated in search_api:8.x-1.23 and is removed from search_api:2.0.0. There is no replacement. See https://www.drupal.org/node/3247781.', E_USER_DEPRECATED); use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema; /** * Defines a storage schema for task entities. * * @deprecated in search_api:8.x-1.23 and is removed from search_api:2.0.0. * There is no replacement. * * @see https://www.drupal.org/node/3247781 */ class TaskStorageSchema extends SqlContentEntityStorageSchema { Loading Loading
CHANGELOG.txt +3 −1 Original line number Diff line number Diff line Search API 1.x, dev (xxxx-xx-xx): --------------------------------- - #3247781 (follow-up) by drunken monkey: Fixed missing update for Task entity storage schema. Search API 1.22 (2022-01-12): ----------------------------- Loading
search_api.install +12 −1 Original line number Diff line number Diff line Loading @@ -8,9 +8,10 @@ use Drupal\Component\Render\FormattableMarkup; use Drupal\Component\Render\MarkupInterface; use Drupal\Core\Database\DatabaseException; use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema; use Drupal\Core\Link; use Drupal\search_api\Entity\Server; use Drupal\Core\Url; use Drupal\search_api\Entity\Server; use Drupal\search_api\Entity\TaskStorageSchema; /** Loading Loading @@ -398,3 +399,13 @@ function search_api_update_8109(): MarkupInterface { return t('Enabled "Track changes in referenced entities" on all existing search indexes.'); } /** * Remove the unique index from the task entity type's storage. */ function search_api_update_8110() { $manager = \Drupal::entityDefinitionUpdateManager(); $entity_type = $manager->getEntityType('search_api_task'); $entity_type->setHandlerClass('storage_schema', SqlContentEntityStorageSchema::class); $manager->updateEntityType($entity_type); }
src/Entity/Task.php +0 −3 Original line number Diff line number Diff line Loading @@ -27,9 +27,6 @@ use Drupal\search_api\Task\TaskInterface; * entity_keys = { * "id" = "id", * }, * handlers = { * "storage_schema" = "Drupal\search_api\Entity\TaskStorageSchema", * }, * ) */ class Task extends ContentEntityBase implements TaskInterface { Loading
src/Entity/TaskStorageSchema.php +7 −0 Original line number Diff line number Diff line Loading @@ -2,11 +2,18 @@ namespace Drupal\search_api\Entity; @trigger_error('\Drupal\search_api\Entity\TaskStorageSchema is deprecated in search_api:8.x-1.23 and is removed from search_api:2.0.0. There is no replacement. See https://www.drupal.org/node/3247781.', E_USER_DEPRECATED); use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema; /** * Defines a storage schema for task entities. * * @deprecated in search_api:8.x-1.23 and is removed from search_api:2.0.0. * There is no replacement. * * @see https://www.drupal.org/node/3247781 */ class TaskStorageSchema extends SqlContentEntityStorageSchema { Loading