only in patch2:
unchanged:
--- a/easy_install.module
+++ b/easy_install.module
@@ -22,7 +22,7 @@ function easy_install_form_alter(&$form, FormStateInterface $form_state, $form_i
     foreach ($modules as $module) {
       $install_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
       $optional_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY;
-      $install_details = file_scan_directory($install_dir, "/\.(yml)$/");
+      $install_details = \Drupal::service('file_system')->scanDirectory($install_dir, "/\.(yml)$/");
       if (!empty($install_details)) {
         $form['modules_config'][$module] = [
           '#type' => 'details',
@@ -32,7 +32,7 @@ function easy_install_form_alter(&$form, FormStateInterface $form_state, $form_i
           '#validated' => TRUE,
           '#open' => TRUE,
         ];
-        $install_details = file_scan_directory($install_dir, "/\.(yml)$/");
+        $install_details = \Drupal::service('file_system')->scanDirectory($install_dir, "/\.(yml)$/");
         $ins_options = [];
         foreach ($install_details as $config_value) {
           $ins_options[$config_value->name] = $config_value->name;
@@ -46,7 +46,7 @@ function easy_install_form_alter(&$form, FormStateInterface $form_state, $form_i
             '#validated' => TRUE,
           ];
         }
-        $optional_details = file_scan_directory($optional_dir, "/\.(yml)$/");
+        $optional_details = \Drupal::service('file_system')->scanDirectory($optional_dir, "/\.(yml)$/");
         $opt_options = [];
         foreach ($optional_details as $config_value) {
           $opt_options[$config_value->name] = $config_value->name;
only in patch2:
unchanged:
--- a/src/Form/PurgeConfigurationsConfirmForm.php
+++ b/src/Form/PurgeConfigurationsConfirmForm.php
@@ -4,14 +4,15 @@ namespace Drupal\easy_install\Form;
 
 use Drupal\Core\Config\ConfigManagerInterface;
 use Drupal\Core\Config\Entity\ConfigDependencyDeleteFormTrait;
+use Drupal\Core\Config\InstallStorage;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Extension\ModuleInstallerInterface;
+use Drupal\Core\File\FileSystemInterface;
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
 use Drupal\Core\Url;
 use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
-use Drupal\Core\Config\InstallStorage;
 
 /**
  * Builds a confirmation form to uninstall selected modules.
@@ -47,6 +48,13 @@ class PurgeConfigurationsConfirmForm extends ConfirmFormBase {
    */
   protected $entityTypeManager;
 
+  /**
+   * File System.
+   *
+   * @var \Drupal\Core\File\FileSystemInterface
+   */
+  protected $fileSystem;
+
   /**
    * An array of modules to uninstall.
    *
@@ -66,11 +74,12 @@ class PurgeConfigurationsConfirmForm extends ConfirmFormBase {
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager
    *   The entity manager.
    */
-  public function __construct(ModuleInstallerInterface $module_installer, KeyValueStoreExpirableInterface $key_value_expirable, ConfigManagerInterface $config_manager, EntityTypeManagerInterface $entity_manager) {
+  public function __construct(ModuleInstallerInterface $module_installer, KeyValueStoreExpirableInterface $key_value_expirable, ConfigManagerInterface $config_manager, EntityTypeManagerInterface $entity_manager, FileSystemInterface $file_system) {
     $this->moduleInstaller = $module_installer;
     $this->keyValueExpirable = $key_value_expirable;
     $this->configManager = $config_manager;
     $this->entityTypeManager = $entity_manager;
+    $this->fileSystem = $file_system;
   }
 
   /**
@@ -81,7 +90,8 @@ class PurgeConfigurationsConfirmForm extends ConfirmFormBase {
       $container->get('module_installer'),
       $container->get('keyvalue.expirable')->get('easy_install_purgeconfigs'),
       $container->get('config.manager'),
-      $container->get('entity.manager')
+      $container->get('entity_type.manager'),
+      $container->get('file_system')
     );
   }
 
@@ -89,6 +99,7 @@ class PurgeConfigurationsConfirmForm extends ConfirmFormBase {
    * {@inheritdoc}
    */
   public function getQuestion() {
+
     return $this->t('Confirm Purge Configurations');
   }
 
@@ -141,7 +152,7 @@ class PurgeConfigurationsConfirmForm extends ConfirmFormBase {
     foreach ($this->modules['install'] as $module => $module_name) {
       $install_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
       $optional_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY;
-      $install_details = file_scan_directory($install_dir, "/\.(yml)$/");
+      $install_details = $this->fileSystem->scanDirectory($install_dir, "/\.(yml)$/");
       if (!empty($install_details)) {
         $form['modules_config'][$module] = [
           '#type' => 'details',
@@ -151,7 +162,7 @@ class PurgeConfigurationsConfirmForm extends ConfirmFormBase {
           '#validated' => TRUE,
           '#open' => TRUE,
         ];
-        $install_details = file_scan_directory($install_dir, "/\.(yml)$/");
+        $install_details = $this->fileSystem->scanDirectory($install_dir, "/\.(yml)$/");
         $ins_options = [];
         foreach ($install_details as $config_value) {
           $ins_options[$config_value->name] = $config_value->name;
@@ -165,7 +176,7 @@ class PurgeConfigurationsConfirmForm extends ConfirmFormBase {
             '#validated' => TRUE,
           ];
         }
-        $optional_details = file_scan_directory($optional_dir, "/\.(yml)$/");
+        $optional_details = $this->fileSystem->scanDirectory($optional_dir, "/\.(yml)$/");
         $opt_options = [];
         foreach ($optional_details as $config_value) {
           $opt_options[$config_value->name] = $config_value->name;
