Problem/Motivation

  • Class \Drupal\image\Entity\ImageStyle has a method getPathToken() which is not in interface \Drupal\image\ImageStyleInterface. However, method deliver() of class \Drupal\image\Controller\ImageStyleDownloadController calls this method on parameter $image_style which is typed as \Drupal\image\ImageStyleInterface.
  • File ImageStyleInterface.php also still mentions "@see \Drupal\image\ImageStyleInterface::deliver()"
  • File ImageStyleInterface.php has a "use Drupal\image\ImageEffectInterface;" statement while that class is in the same namespace and thus does not have to be declared with a use statement.
  • ImageStyleInterface uses the deprecated drupal_get_private_key().

Proposed resolution

Add method to interface and resolve the other 3 issues.

Remaining tasks

Write patch.

User interface changes

None.

API changes

Method is added to API but will be documented automatically.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fietserwin’s picture

Category: Task » Bug report
Status: Active » Needs review
FileSize
2.37 KB
mondrake’s picture

Status: Needs review » Needs work

Minor things

+++ b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php
@@ -312,17 +312,7 @@ public function transformDimensions(array &$dimensions) {
+   * @inheritdoc

{@inheritdoc} enclosed in curly brackets

+++ b/core/modules/image/lib/Drupal/image/ImageStyleInterface.php
@@ -70,11 +69,26 @@ public function buildUri($uri);
+   * @see \Drupal\image\Controller\ImageStyleDownloadcontroller::deliver()

ImageStyleDownloadController (with capital 'C' for Controller)

fietserwin’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
2.67 KB
1.52 KB

Changed + removed a deprecated use of drupal_get_private_key().

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Looks ready to go to me.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • Commit ec5b434 on 8.x by catch:
    Issue #2198325 by fietserwin: GetPathToken not in ImageStyleInterface (+...
fietserwin’s picture

Assigned: fietserwin » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.