From 00bcb11b55093677beca891a888fcf7a56d92d35 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Sat, 15 Feb 2020 07:15:59 +0000 Subject: [PATCH] Issue #3112683 by Hardik_Patel_12, andypost, alexpott: Remove all @deprecated code from Field component --- .../Drupal/Core/Field/BaseFieldDefinition.php | 46 ------------------- .../Field/FieldStorageDefinitionInterface.php | 14 ------ 2 files changed, 60 deletions(-) diff --git a/core/lib/Drupal/Core/Field/BaseFieldDefinition.php b/core/lib/Drupal/Core/Field/BaseFieldDefinition.php index b508f8bf188..7cd56e25788 100644 --- a/core/lib/Drupal/Core/Field/BaseFieldDefinition.php +++ b/core/lib/Drupal/Core/Field/BaseFieldDefinition.php @@ -288,34 +288,6 @@ class BaseFieldDefinition extends ListDataDefinition implements FieldDefinitionI return ($cardinality == static::CARDINALITY_UNLIMITED) || ($cardinality > 1); } - /** - * {@inheritdoc} - */ - public function isQueryable() { - @trigger_error('BaseFieldDefinition::isQueryable() is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\Field\BaseFieldDefinition::hasCustomStorage(). See https://www.drupal.org/node/2856563.', E_USER_DEPRECATED); - return !$this->hasCustomStorage(); - } - - /** - * Sets whether the field is queryable. - * - * @param bool $queryable - * Whether the field is queryable. - * - * @return static - * The object itself for chaining. - * - * @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. Use - * \Drupal\Core\Field\BaseFieldDefinition::setCustomStorage() instead. - * - * @see https://www.drupal.org/node/2856563 - */ - public function setQueryable($queryable) { - @trigger_error('BaseFieldDefinition::setQueryable() is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\Field\BaseFieldDefinition::setCustomStorage(). See https://www.drupal.org/node/2856563.', E_USER_DEPRECATED); - $this->definition['queryable'] = $queryable; - return $this; - } - /** * Sets constraints for a given field item property. * @@ -634,24 +606,6 @@ class BaseFieldDefinition extends ListDataDefinition implements FieldDefinitionI return $class::mainPropertyName(); } - /** - * Helper to retrieve the field item class. - * - * @deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use - * \Drupal\Core\TypedData\ListDataDefinition::getClass() instead. - */ - protected function getFieldItemClass() { - @trigger_error('BaseFieldDefinition::getFieldItemClass() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\TypedData\ListDataDefinition::getClass(). See https://www.drupal.org/node/2933964.', E_USER_DEPRECATED); - if ($class = $this->getItemDefinition()->getClass()) { - return $class; - } - else { - $type_definition = \Drupal::typedDataManager() - ->getDefinition($this->getItemDefinition()->getDataType()); - return $type_definition['class']; - } - } - /** * {@inheritdoc} */ diff --git a/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php b/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php index 76fb5e52ae9..34cc058462a 100644 --- a/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php +++ b/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php @@ -108,20 +108,6 @@ interface FieldStorageDefinitionInterface extends CacheableDependencyInterface { */ public function isRevisionable(); - /** - * Determines whether the field is queryable via QueryInterface. - * - * @return bool - * TRUE if the field is queryable. - * - * @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. Use - * \Drupal\Core\Field\FieldStorageDefinitionInterface::hasCustomStorage() - * instead. - * - * @see https://www.drupal.org/node/2856563 - */ - public function isQueryable(); - /** * Returns the human-readable label for the field. *