reverted: --- b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php +++ a/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php @@ -24,7 +24,5 @@ // functions. This default is overridden by drupal_language_initialize() // during language negotiation. $this->register(LANGUAGE_TYPE_INTERFACE, 'Drupal\\Core\\Language\\Language'); - - $this->register('image.effect', 'Drupal\image\Effect'); } } diff -u b/core/modules/image/image.module b/core/modules/image/image.module --- b/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -7,6 +7,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\StreamedResponse; +use Drupal\image\Effect; /** * Image style constant for user presets in the database. @@ -931,7 +932,11 @@ * @see image_effect_definition_load() */ function image_effect_definitions() { - return drupal_container()->get('image.effect')->getPluginDefinitions(); + // @todo Rather than hard-coding the plugin type class, register this with + // Drupal's dependency injection container once it supports compilable + // registration of module classes. + $plugin_type = new Effect(); + return $plugin_type->getPluginDefinitions(); } /** @@ -957,7 +962,11 @@ * one-line summary of the effect. Does not include the "theme_" prefix. */ function image_effect_definition_load($effect) { - return drupal_container()->get('image.effect')->getPluginDefinition($effect); + // @todo Rather than hard-coding the plugin type class, register this with + // Drupal's dependency injection container once it supports compilable + // registration of module classes. + $plugin_type = new Effect(); + return $plugin_type->getPluginDefinition($effect); } /**