diff --git a/filefield_paths.info.yml b/filefield_paths.info.yml index 62806e999b1f6b3613e7c16063e4b9ef00aa1379..74ce9e124acead45c23e3cbbfc950a9afce45ab9 100644 --- a/filefield_paths.info.yml +++ b/filefield_paths.info.yml @@ -2,7 +2,7 @@ name: 'File (Field) Paths' description: 'Adds improved Token based file sorting and renaming functionalities.' package: Fields configure: filefield_paths.admin_settings -core_version_requirement: ^10.3 +core_version_requirement: ^10.3 || ^11 type: module dependencies: - drupal:file diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php index 005d5b765d3f2f58d472ff58354a980da881b328..b198e9ffe5370cb1ffb733f8028482c80700c871 100644 --- a/src/Form/SettingsForm.php +++ b/src/Form/SettingsForm.php @@ -10,6 +10,7 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; +use Drupal\Core\Config\TypedConfigManagerInterface; /** * Administration settings form for File (Field) Paths. @@ -35,8 +36,8 @@ class SettingsForm extends ConfigFormBase { /** * {@inheritdoc} */ - public function __construct(ConfigFactoryInterface $config_factory, StreamWrapperManagerInterface $stream_wrapper_manager, FileSystemInterface $file_system) { - parent::__construct($config_factory); + public function __construct(ConfigFactoryInterface $config_factory, StreamWrapperManagerInterface $stream_wrapper_manager, FileSystemInterface $file_system, TypedConfigManagerInterface $typed_configmanager) { + parent::__construct($config_factory, $typed_configmanager); $this->streamWrapperManager = $stream_wrapper_manager; $this->fileSystem = $file_system; } @@ -48,7 +49,8 @@ class SettingsForm extends ConfigFormBase { return new static( $container->get('config.factory'), $container->get('stream_wrapper_manager'), - $container->get('file_system') + $container->get('file_system'), + $container->get('config.typed') ); } diff --git a/tests/modules/filefield_paths_test/filefield_paths_test.info.yml b/tests/modules/filefield_paths_test/filefield_paths_test.info.yml index b554f55b2575d0414021e0bbe16eb36a9bf758f8..55726afa6a50c1076e2bf9f85a5ff77616d4ed57 100644 --- a/tests/modules/filefield_paths_test/filefield_paths_test.info.yml +++ b/tests/modules/filefield_paths_test/filefield_paths_test.info.yml @@ -2,6 +2,7 @@ name: 'File (Field) Paths tests' description: 'Support module for File (Field) Paths related testing.' package: Testing type: module +core_version_requirement: ^10.3 || ^11.0 dependencies: - filefield_paths:filefield_paths - drupal:file_test