Commit 9ba7f47e authored by catch's avatar catch
Browse files

task: #3498540 Deprecate unused ImageStyle::getReplacementID()

By: neclimdul
By: quietone
By: shalini_jha
By: catch
By: mondrake
By: dcam
(cherry picked from commit f7b1c2b9)
parent 3b4ad0e0
Loading
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -18169,12 +18169,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/image/src/Controller/ImageStyleDownloadController.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\image\\\\Entity\\\\ImageStyle\\:\\:getReplacementID\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/image/src/Entity/ImageStyle.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\image\\\\Entity\\\\ImageStyle\\:\\:postDelete\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
+11 −1
Original line number Diff line number Diff line
@@ -433,9 +433,19 @@ public function addImageEffect(array $configuration) {
  }

  /**
   * {@inheritdoc}
   * Returns the replacement ID for the image style.
   *
   * @return string|null
   *   The replacement image style ID, or NULL if no replacement exists.
   *
   * @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. There
   *   is no replacement.
   *
   * @see https://www.drupal.org/node/3520914
   * @see \Drupal\image\ImageStyleStorageInterface::getReplacementId
   */
  public function getReplacementID() {
    @trigger_error("\Drupal\image\Entity\ImageStyle::getReplacementID() is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3520914", E_USER_DEPRECATED);
    /** @var \Drupal\image\ImageStyleStorageInterface $storage */
    $storage = $this->entityTypeManager()->getStorage($this->getEntityTypeId());
    return $storage->getReplacementId($this->id());