Unverified Commit 00bcb11b authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3112683 by Hardik_Patel_12, andypost, alexpott: Remove all @deprecated...

Issue #3112683 by Hardik_Patel_12, andypost, alexpott: Remove all @deprecated code from Field component
parent d57f7ebc
Loading
Loading
Loading
Loading
+0 −46
Changes for core/lib/Drupal/Core/Field/BaseFieldDefinition.php: 0 added lines, 46 removed lines.
Original line number Diff line number Diff line
@@ -288,34 +288,6 @@ public function isMultiple() {
    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 @@ public function getMainPropertyName() {
    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}
   */
+0 −14
Changes for core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php: 0 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -108,20 +108,6 @@ public function setTranslatable($translatable);
   */
  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.
   *