Support from Acquia helps fund testing for Drupal Acquia logo

Comments

edysmp created an issue. See original summary.

edysmp’s picture

Status: Needs review » Needs work

The last submitted patch, 2: allow_preprocess_image_style-2764421-2.patch, failed testing.

The last submitted patch, 2: allow_preprocess_image_style-2764421-2.patch, failed testing.

The last submitted patch, 2: allow_preprocess_image_style-2764421-2.patch, failed testing.

The last submitted patch, 2: allow_preprocess_image_style-2764421-2.patch, failed testing.

edysmp’s picture

edysmp’s picture

Sam152’s picture

Thanks for working on this. I'll take a look at this shortly. I think it would be a reach to call this an API break, and it's a clear improvement, so I think this belongs in 8.x-1.x.

Sam152’s picture

Status: Needs review » Fixed

Fixed on commit:

diff --git a/src/ProviderPluginBase.php b/src/ProviderPluginBase.php
index f750712..475b1d9 100644
--- a/src/ProviderPluginBase.php
+++ b/src/ProviderPluginBase.php
@@ -3,7 +3,6 @@
 namespace Drupal\video_embed_field;
 
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
-use Drupal\image\Entity\ImageStyle;
 use GuzzleHttp\ClientInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
diff --git a/tests/src/Kernel/FieldOutputTest.php b/tests/src/Kernel/FieldOutputTest.php
index 7acd2c2..4b3066b 100644
--- a/tests/src/Kernel/FieldOutputTest.php
+++ b/tests/src/Kernel/FieldOutputTest.php
@@ -37,13 +37,13 @@ class FieldOutputTest extends KernelTestBase {
         [
           'type' => 'video_embed_field_thumbnail',
           'settings' => [
-            'image_style' => 'thumbnail'
+            'image_style' => 'thumbnail',
           ],
         ],
         [
           '#theme' => 'image_style',
           '#uri' => 'public://video_thumbnails/fdbFVWupSsw.jpg',
-          '#style_name' => 'thumbnail'
+          '#style_name' => 'thumbnail',
         ],
       ],
       'YouTube: Embed Code' => [
diff --git a/tests/src/Kernel/KernelTestBase.php b/tests/src/Kernel/KernelTestBase.php
index dcc0fc5..b86d36f 100644
--- a/tests/src/Kernel/KernelTestBase.php
+++ b/tests/src/Kernel/KernelTestBase.php
@@ -50,7 +50,7 @@ abstract class KernelTestBase extends CoreKernelTestBase {
 
     $this->installEntitySchema($this->entityTypeId);
 
-    // Install Image Styles
+    // Install image styles.
     $this->installConfig(['image']);
 
     EntityViewDisplay::create([

  • Sam152 committed ba0f806 on 8.x-1.x authored by edysmp
    Issue #2764421 by edysmp: Allow preprocess to image style when render...

Status: Fixed » Closed (fixed)

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