Skip to content
Snippets Groups Projects
Commit 704e68ab authored by Steven Jones's avatar Steven Jones
Browse files

Issue #3117904 by mo_farhaz, Daniel Korte, NickDickinsonWilde, dpi, voleger,...

Issue #3117904 by mo_farhaz, Daniel Korte, NickDickinsonWilde, dpi, voleger, FatGuyLaughing: Drupal 9 readiness
parent bb665be5
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ type: module
package: Image Optimize
description: 'Define pipelines for image optimization and provide integration with core image styles.'
core: 8.x
core_version_requirement: ^8 || ^9
dependencies:
- drupal:system (>= 8.2)
configure: entity.imageapi_optimize_pipeline.collection
......@@ -39,7 +39,7 @@ class ImageAPIOptimizePipelineEditForm extends ImageAPIOptimizePipelineFormBase
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity.manager')->getStorage('imageapi_optimize_pipeline'),
$container->get('entity_type.manager')->getStorage('imageapi_optimize_pipeline'),
$container->get('plugin.manager.imageapi_optimize.processor')
);
}
......
......@@ -41,7 +41,7 @@ abstract class ImageAPIOptimizePipelineFormBase extends EntityForm {
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity.manager')->getStorage('imageapi_optimize_pipeline')
$container->get('entity_type.manager')->getStorage('imageapi_optimize_pipeline')
);
}
......
......@@ -30,7 +30,7 @@ class ImageAPIOptimizePipelineListBuilder extends ConfigEntityListBuilder {
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
$container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('entity_type.manager')->getStorage($entity_type->id()),
$container->get('form_builder')
);
}
......
......@@ -3,7 +3,6 @@
namespace Drupal\imageapi_optimize;
use Drupal\Component\Plugin\ConfigurableInterface;
use Drupal\Component\Plugin\ConfigurablePluginInterface;
use Drupal\Component\Plugin\DependentPluginInterface;
use Drupal\Component\Plugin\PluginInspectionInterface;
......@@ -17,7 +16,7 @@ use Drupal\Component\Plugin\PluginInspectionInterface;
* @see \Drupal\imageapi_optimize\ImageAPIOptimizeProcessorManager
* @see plugin_api
*/
interface ImageAPIOptimizeProcessorInterface extends PluginInspectionInterface, ConfigurableInterface, DependentPluginInterface, ConfigurablePluginInterface {
interface ImageAPIOptimizeProcessorInterface extends PluginInspectionInterface, ConfigurableInterface, DependentPluginInterface {
/**
* Returns a render array summarizing the configuration of the image optimize processor.
......
......@@ -3,5 +3,6 @@ type: module
description: 'Provides hook implementations for testing Image Optimize module functionality.'
package: Testing
core: 8.x
core_version_requirement: ^8 || ^9
dependencies:
- imageapi_optimize:imageapi_optimize
......@@ -181,7 +181,7 @@ class ImageOptimizePipelineTest extends KernelTestBase {
$filepath = 'Файл для тестирования ' . $this->randomMachineName();
}
if (!isset($scheme)) {
$scheme = file_default_scheme();
$scheme = \Drupal::config('system.file')->get('default_scheme');
}
$filepath = $scheme . '://' . $filepath;
......@@ -200,7 +200,7 @@ class ImageOptimizePipelineTest extends KernelTestBase {
public function testNonExistentImagePipeline() {
// Include special characters in the filename.
$image_uri = file_default_scheme() . '://Файл для тестирования ' . $this->randomMachineName() . '.png';
$image_uri = \Drupal::config('system.file')->get('default_scheme') . '://Файл для тестирования ' . $this->randomMachineName() . '.png';
$this->assertFalse(is_file($image_uri), t('The test file does not exist on the disk.'));
// Setup our pipeline.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment