Ensure that the .drush/drush.yml file has the right config.

@param \Platformsh\Cli\Service\Drush $drush
970087
protected function ensureDrushConfig(Drush $drush)
    {
        if (!is_dir($drush->getSiteAliasDir())) {
            return;
        }

        $drushYml = $drush->getDrushDir() . '/drush.yml';
        $drushConfig = [];
        if (file_exists($drushYml)) {
            $drushConfig = (array) Yaml::parse(file_get_contents($drushYml));
        }
        $aliasPath = $drush->getSiteAliasDir();
        if (getenv('HOME')) {
            $aliasPath = str_replace(getenv('HOME') . '/', '${env.home}/', $aliasPath);
        }
        if (empty($drushConfig['drush']['paths']['alias-path'])
            || !in_array($aliasPath, $drushConfig['drush']['paths']['alias-path'], true)) {
            if (file_exists($drushYml)) {
                $this->stdErr->writeln('Writing to <info>~/.drush/drush.yml</info> file to configure the global alias-path');
            } else {
                $this->stdErr->writeln('Creating <info>~/.drush/drush.yml</info> file to configure the global alias-path');
            }

            $drushConfig['drush']['paths']['alias-path'][] = $aliasPath;

            /** @var \Platformsh\Cli\Service\Filesystem $fs */
            $fs = $this->getService('fs');
            $fs->writeFile($drushYml, Yaml::dump($drushConfig, 5));
        }
    }
431635
protected function setYamlConfig(array $yaml)
    {
        $this->yaml = array_replace_recursive(
            Yaml::parse(file_get_contents(__DIR__.'/../Resources/config/default.yml')),
            $yaml
        );
    }
1223030
public function updateAll() {
    // Disable alias since we are targeting specific uri.
    $this->config->set('drush.alias', '');

    foreach ($this->getConfigValue('multisites') as $multisite) {
      $this->updateSite($multisite);
    }
  }
259491
public function postDeploy() {
    $terminus_site_env = $this->getPantheonSiteEnv();
    $pantheon_prefix   = getenv('TERMINUS_SITE');
    if ($terminus_site_env == $pantheon_prefix . '.develop' || $terminus_site_env == $pantheon_prefix . '.dev') {
      $drush_commands = [
        'drush_partial_config_import' => "terminus remote:drush $terminus_site_env -- config-import --partial -y",
        'drush_cache_clear' => "terminus remote:drush $terminus_site_env -- cr",
        'drush_entity_updates' => "terminus remote:drush $terminus_site_env -- entity-updates -y",
        'drush_update_database' => "terminus remote:drush $terminus_site_env -- updb -y",
        'drush_full_config_import' => "terminus remote:drush $terminus_site_env -- config-import -y",
      ];
      // Run the installation.
      $result = $this->taskExec(implode(' && ', $drush_commands))
        ->run();
    }
  }
256195
public function loadConfigurationFile($file = null)
    {
        $file = $file ?: $this->findConfigurationFile();
        if (! file_exists($file))
            return;

        $this->config = $this->yaml->load($file);
    }
721888
public static function useConfig($data): void
    {
        defined('KOLDY_START') || define('KOLDY_START', microtime(true));
        defined('KOLDY_CLI') || define('KOLDY_CLI', PHP_SAPI == 'cli');
        defined('DS') || define('DS', DIRECTORY_SEPARATOR); // this is just shorthand for Directory Separator

        if (!is_string($data) && !is_array($data)) {
            static::terminateWithError('Can not start application, expected array or string (path to config file) when useConfig is called; got ' . gettype($data));
        }

        $configInstance = new Config('application');

        if (is_string($data)) {
            $applicationConfigPath = stream_resolve_include_path($data); // this is path to /application/configs/application.php

            if ($applicationConfigPath === false || !is_file($applicationConfigPath)) {
                static::terminateWithError('Can not resolve the full path to the main application config file or file doesn\'t exists!');
            }

            try {
                $configInstance->loadFrom($applicationConfigPath);
            } catch (ConfigException $e) {
                static::terminateWithError($e->getMessage());
            }
        } else {
            $configInstance->setData($data);
        }

        static::$publicPath = dirname($_SERVER['SCRIPT_FILENAME']) . '/';

        // now, let's examine configuration we got - it's getting more strict now
        try {
            $siteUrl = $configInstance->get('site_url');

            if ($siteUrl == null) {
                static::$domain = $_SERVER['HTTP_HOST'] ?? null;
                static::$isSSL = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';

            } else if (is_string($siteUrl)) {
                $siteUrl = explode('//', $siteUrl);

                if (count($siteUrl) != 2) {
                    throw new ConfigException('Defined site_url in application config must contain double slash');
                }

                static::$domain = $siteUrl[1];
                static::$isSSL = substr($siteUrl[0], 0, 6) == 'https:';

            } else if (is_array($siteUrl)) {
                if (count($siteUrl) === 0) {
                    throw new ConfigException('If site_url is defined as array, then it must be non-empty array');
                }

                if (isset($_SERVER['HTTP_HOST'])) {
                    foreach ($siteUrl as $domainWithSchema) {
                        $doubleSlashPosition = strpos($domainWithSchema, '//');

                        if ($doubleSlashPosition === false) {
                            throw new ConfigException('Every defined site_url in application config must contain double slash (//)');
                        }

                        $domain = substr($domainWithSchema, $doubleSlashPosition + 2);

                        if ($domain == $_SERVER['HTTP_HOST']) {

                            static::$domain = $domain;
                            static::$isSSL = substr($domainWithSchema, 0, 6) == 'https:';
                        }
                    }
                } else {
                    // we are probably in CLI mode, so let's take the first value from 'site_url' config
                    $domainWithSchema = $siteUrl[0];

                    $doubleSlashPosition = strpos($domainWithSchema, '//');

                    if ($doubleSlashPosition === false) {
                        throw new ConfigException('Every defined site_url in application config must contain double slash (//)');
                    }

                    $domain = substr($domainWithSchema, $doubleSlashPosition + 2);

                    static::$domain = $domain;
                    static::$isSSL = substr($domainWithSchema, 0, 6) == 'https:';
                }

                // beware then static::$domain might stay null, in this case, in run(), redirect to first domain if site_url is array
            }
        } catch (ConfigException $e) {
            static::terminateWithError($e->getMessage());
        }


        $paths = $configInstance->get('paths');

        if (!is_array($paths)) {
            static::terminateWithError('Application config doesn\'t have paths array defined');
        }

        ///// APPLICATION PATH /////
        if (!isset($paths['application'])) {
            static::terminateWithError('Path to \'application\' in \'paths\' is not defined');
        } else if (substr($paths['application'], -1) != '/') {
            static::terminateWithError('Path to \'application\' in \'paths\' must end with slash (/)');
        }

        static::$applicationPath = $paths['application'];


        ///// STORAGE PATH /////
        if (!isset($paths['storage'])) {
            static::terminateWithError('Path to \'storage\' in \'paths\' is not defined');
        } else if (substr($paths['storage'], -1) != '/') {
            static::terminateWithError('Path to \'storage\' in \'paths\' must end with slash (/)');
        }

        static::$storagePath = $paths['storage'];


        ///// VIEW PATH /////
        if (isset($paths['view']) && substr($paths['storage'], -1) != '/') {
            static::terminateWithError('Path to \'storage\' in \'paths\' must end with slash (/)');
        }

        static::$viewPath = $paths['view'] ?? (static::$applicationPath . 'views/');


        ///// MODULES PATH /////
        if (isset($paths['modules']) && substr($paths['modules'], -1) != '/') {
            static::terminateWithError('Path to \'modules\' in \'paths\' must end with slash (/)');
        }

        static::$modulePath = $paths['modules'] ?? (static::$applicationPath . 'modules/');


        ///// CONFIGS PATH /////
        if (isset($paths['configs']) && substr($paths['configs'], -1) != '/') {
            static::terminateWithError('Path to \'configs\' in \'paths\' must end with slash (/)');
        }

        static::$configsPath = $paths['configs'] ?? (static::$applicationPath . 'configs/');


        ///// SCRIPTS PATH /////
        if (isset($paths['scripts']) && substr($paths['scripts'], -1) != '/') {
            static::terminateWithError('Path to \'scripts\' in \'paths\' must end with slash (/)');
        }

        static::$scriptsPath = $paths['scripts'] ?? (static::$applicationPath . 'scripts/');


        // check the environment
        $env = $configInstance->get('env');
        if ($env === null || !($env == static::DEVELOPMENT || $env == static::PRODUCTION || $env == static::TEST)) {
            static::terminateWithError('Invalid ENV parameter in main application config');
        }
        static::$env = $env;

        $key = $configInstance->get('key');
        if (!isset($key) || !is_string($key) || strlen($key) > 32) {
            static::terminateWithError('Invalid unique key in main application config. It has to be max 32 chars long.');
        }

        $timezone = $configInstance->get('timezone');
        if (!isset($timezone)) {
            static::terminateWithError('Timezone is not set in main application config');
        }

        static::$isLive = $configInstance->get('live') === true;
        static::$configs['application'] = $configInstance;
	    static::$appName = $configInstance->get('app_name');
    }
990501
protected function isLegacyDrush() {
    try {
      // Try for a drush 9 version.
      $version = trim($this->drush('version', [], ['format' => 'string']));
      return version_compare($version, '9', '<=');
    }
    catch (\RuntimeException $e) {
      // The version of drush is old enough that only `--version` was available,
      // so this is a legacy version.
      return TRUE;
    }
  }
470273
protected function configure(): void
    {
        $this->setName('project:run')
            ->setAliases(['run'])
            ->setDescription(
                'Parses and transforms the given files to a specified location'
            )
            ->setHelp(
                <<<HELP
                phpDocumentor creates documentation from PHP source files. The simplest way
                to use it is:
                
                    <info>$ phpdoc run -d [directory to parse] -t [output directory]</info>
                
                This will parse every file ending with .php, .php3 and .phtml in <directory
                to parse> and then output a HTML site containing easily readable documentation
                in <output directory>.
                
                phpDocumentor will try to look for a phpdoc.dist.xml or phpdoc.xml file in your
                current working directory and use that to override the default settings if
                present. In the configuration file can you specify the same settings (and
                more) as the command line provides.
                
                <comment>Other commands</comment>
                In addition to this command phpDocumentor also supports additional commands:
                
                <comment>Available commands:</comment>
                <info>  help
                  list
                  parse
                  run
                  transform
                <comment>project</comment>
                  project:parse
                  project:run
                  project:transform
                <comment>template</comment>
                  template:generate
                  template:list
                  template:package</info>
                
                You can get a more detailed listing of the commands using the <info>list</info>
                command and get help by prepending the word <info>help</info> to the command
                name.
HELP
            )
            ->addOption(
                'target',
                't',
                InputOption::VALUE_OPTIONAL,
                'Path where to store the generated output'
            )
            ->addOption(
                'cache-folder',
                null,
                InputOption::VALUE_OPTIONAL,
                'Path where to store the cache files'
            )
            ->addOption(
                'filename',
                'f',
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of files to parse. The wildcards ? and * are supported'
            )
            ->addOption(
                'directory',
                'd',
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of directories to (recursively) parse'
            )
            ->addOption(
                'encoding',
                null,
                InputOption::VALUE_OPTIONAL,
                'encoding to be used to interpret source files with'
            )
            ->addOption(
                'extensions',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of extensions to parse, defaults to php, php3 and phtml'
            )
            ->addOption(
                'ignore',
                'i',
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of file(s) and directories (relative to the source-code directory) that will be '
                . 'ignored. Wildcards * and ? are supported'
            )
            ->addOption(
                'ignore-tags',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of tags that will be ignored, defaults to none. package, subpackage and ignore '
                . 'may not be ignored.'
            )
            ->addOption(
                'hidden',
                null,
                InputOption::VALUE_NONE,
                'Use this option to tell phpDocumentor to parse files and directories that begin with a period (.), '
                . 'by default these are ignored'
            )
            ->addOption(
                'ignore-symlinks',
                null,
                InputOption::VALUE_NONE,
                'Ignore symlinks to other files or directories, default is on'
            )
            ->addOption(
                'markers',
                'm',
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of markers/tags to filter'
            )
            ->addOption(
                'title',
                null,
                InputOption::VALUE_OPTIONAL,
                'Sets the title for this project; default is the phpDocumentor logo'
            )
            ->addOption(
                'force',
                null,
                InputOption::VALUE_NONE,
                'Forces a full build of the documentation, does not increment existing documentation'
            )
            ->addOption(
                'validate',
                null,
                InputOption::VALUE_NONE,
                'Validates every processed file using PHP Lint, costs a lot of performance'
            )
            ->addOption(
                'visibility',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Specifies the parse visibility that should be displayed in the documentation (comma separated e.g. '
                . '"public,protected")'
            )
            ->addOption(
                'defaultpackagename',
                null,
                InputOption::VALUE_OPTIONAL,
                'Name to use for the default package.',
                'Default'
            )
            ->addOption(
                'sourcecode',
                null,
                InputOption::VALUE_NONE,
                'Whether to include syntax highlighted source code'
            )
            ->addOption(
                'template',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Name of the template to use (optional)'
            )
            ->addOption(
                'parseprivate',
                null,
                InputOption::VALUE_NONE,
                'Whether to parse DocBlocks marked with @internal tag'
            );

        parent::configure();
    }
76664
public static function configure(): void
    {
        $filesystem = new Filesystem();
        $config     = [
            'colors'          => '1',
            'installed_paths' => implode(',', [
                Path::VENDOR_DIR . '/hostnet/phpcs-tool/src/',
                Path::VENDOR_DIR . '/slevomat/coding-standard/SlevomatCodingStandard',
            ]),
        ];

        if (!$filesystem->exists(['phpcs.xml', 'phpcs.xml.dist'])) {
            $config['default_standard'] = 'Hostnet';
        }

        $filesystem->dumpFile(
            Path::VENDOR_DIR . '/squizlabs/php_codesniffer/CodeSniffer.conf',
            sprintf('<?php $phpCodeSnifferConfig = %s;', var_export($config, true))
        );

        $filesystem->dumpFile(__DIR__ . '/../../../HostnetPaths/ruleset.xml', self::generateHostnetPathsXml());
    }
780565
protected function customizeConfigFiles() {
    /** @var \Acquia\Blt\Robo\Config\BltConfig $config */
    $config = clone $this->getConfig();

    $config->set('drupalvm.config.dir', $this->vmConfigDir);
    $config->expandFileProperties($this->projectDrupalVmVagrantfile);

    // Generate a Random IP address for the new VM.
    $random_local_ip = "192.168." . rand(3, 254) . '.' . rand(3, 254);
    $config->set('random.ip', $random_local_ip);

    $this->setBaseBox($config);

    $config->expandFileProperties($this->projectDrupalVmConfigFile);
  }
501236
protected function configure()
    {

        $filesystemAdapterNames = $this->mountManager->getFilesystemPrefixes();
        $this->setName('filesystem:sync')
            ->addArgument(
                'source',
                InputArgument::REQUIRED,
                "Source path in the format {adapter}://{path}.\nAvailable Adapters: <comment>" . implode(
                    ', ',
                    $filesystemAdapterNames
                )
                . '</comment>'
            )
            ->addArgument(
                'destination',
                InputArgument::REQUIRED,
                "Destination path in the format {adapter}://{path}.\nAvailable Adapters: <comment>" . implode(
                    ', ',
                    $filesystemAdapterNames
                )
                . '</comment>'
            )
            ->addOption(
                'delete',
                null,
                InputOption::VALUE_NONE,
                'Delete files in destination filesystem that do not exist in source'
            )
            ->addOption(
                'ignore-timestamps',
                null,
                InputOption::VALUE_NONE,
                'Push all files, even if a newer matching file exists on the destination'
            )
            ->addOption(
                'exclude',
                null,
                InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
                'Path to exclude, in rsync format'
            )
            ->addOption(
                'include',
                null,
                InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
                'Excluded path to include, in rsync format'
            )
            ->addOption(
                'batch-size',
                null,
                InputOption::VALUE_REQUIRED,
                'Batch size for copy and delete operations',
                100
            )
            ->setDescription(
                'Copy a directory from a source filesystem directory to a destination filesystem directory.'
            )
            ->setHelp(
                "This command copies a directory from a source filesystem directory to a destination filesystem directory."
            );
    }
966123
protected function configure() : void
    {
        $this->setName('configure')
             ->setDescription('Configure your hooks')
             ->setHelp('This command creates or updates your captainhook configuration')
             ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file')
             ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file')
             ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type')
             ->addOption(
                 'configuration',
                 'c',
                 InputOption::VALUE_OPTIONAL,
                 'Path to your json configuration',
                 './' . CH::CONFIG
             );
    }
959974
protected function installConfigFileWithBash()
    {
        passthru(str_replace(" ", "\ ", __DIR__).'/../bash_scripts/iluminar.sh '. str_replace(" ", "\ ", $this->laravel_config_file) .' '
            . str_replace(" ", "\ ", $this->laravel_services_file));
    }
569844
protected function boot() {
    $this->checkRequirements();
    $this->yell(" * We have configured your new Drupal VM to use PHP 7.2. If you would like to change this, edit box/config.yml.");
    $confirm = $this->confirm("Do you want to boot Drupal VM?", TRUE);
    if ($confirm) {
      $this->say("In the future, run <comment>vagrant up</comment> to boot the VM.");
      $result = $this->taskExec("vagrant up")
        ->dir($this->getConfigValue('repo.root'))
        ->printOutput(TRUE)
        ->run();
      if (!$result->wasSuccessful()) {
        $this->logger->error("Drupal VM failed to boot. Read Drupal VM's previous output for more information.");
        $confirm = $this->confirm("Do you want to try to re-provision the VM? Sometimes this works.", TRUE);
        if ($confirm) {
          $result = $this->taskExec("vagrant provision")
            ->dir($this->getConfigValue('repo.root'))
            ->printOutput(TRUE)
            ->run();
          if (!$result->wasSuccessful()) {
            throw new BltException("Unable to provision virtual machine. This is likely due to an issue with your Drupal VM configuration and not BLT itself.");
          }
        }
      }
      else {
        $this->yell("Drupal VM booted successfully.");
        $this->say(" * To run blt or drush commands against your VM, must SSH into the VM via <comment>vagrant ssh</comment>.");
        $this->say(" * From now on, please use vagrant commands to manage your virtual machine on this computer.");
      }
      return $result;
    }
  }
313474
protected function cmdExport() /*: void*/
    {
        /**
         * @see simplecomplex_config_cli()
         */
        $container = Dependency::container();
        // Validate input. ---------------------------------------------
        $store = '';
        if (empty($this->command->arguments['store'])) {
            $this->command->inputErrors[] = !isset($this->command->arguments['store']) ? 'Missing \'store\' argument.' :
                'Empty \'store\' argument.';
        } else {
            $store = $this->command->arguments['store'];
            if (!ConfigKey::validate($store)) {
                $this->command->inputErrors[] = 'Invalid \'store\' argument.';
            }
        }
        $target_file = '';
        if (empty($this->command->arguments['target-file'])) {
            $this->command->inputErrors[] = !isset($this->command->arguments['target-file']) ?
                'Missing \'target-file\' argument.' : 'Empty \'target-file\' argument.';
        } else {
            $target_file = $this->command->arguments['target-file'];
        }

        $from_sources = !empty($this->command->options['from-sources']);
        $format = !empty($this->command->options['format']) ? $this->command->options['format'] : 'JSON';
        $unescaped = !empty($this->command->options['unescaped']);
        $pretty = !empty($this->command->options['pretty']);

        // Pre-confirmation --yes/-y ignored for this command.
        if ($this->environment->riskyCommandRequireConfirm && $this->command->preConfirmed) {
            $this->command->inputErrors[] = 'Pre-confirmation \'yes\'/-y option not supported for this command,'
                . "\n" . 'unless env var PHP_LIB_SIMPLECOMPLEX_UTILS_CLI_SKIP_CONFIRM'
                . "\n" . 'or .risky_command_skip_confirm file in document root.';
        }
        if ($this->command->inputErrors) {
            foreach ($this->command->inputErrors as $msg) {
                $this->environment->echoMessage(
                    $this->environment->format($msg, 'hangingIndent'),
                    'notice'
                );
            }
            // This command's help text.
            $this->environment->echoMessage("\n" . $this->command);
            exit;
        }
        // Display command and the arg values used.---------------------
        if ($this->environment->riskyCommandRequireConfirm || !$this->command->preConfirmed) {
            $this->environment->echoMessage(
                $this->environment->format(
                    $this->environment->format($this->command->name, 'emphasize')
                    . "\n" . 'store: ' . $store
                    . "\n" . 'target-file: ' . $target_file
                    . (!$this->command->options ? '' : ("\n--" . join(' --', array_keys($this->command->options)))),
                    'hangingIndent'
                )
            );
        }
        // Request confirmation, ignore --yes/-y pre-confirmation option;
        // unless .risky_command_skip_confirm file placed in document root.
        if ($this->environment->riskyCommandRequireConfirm) {
            if (!$this->environment->confirm(
                'Export that config store from ' . (!$from_sources ? 'cache' : 'sources')
                . ' - will overwrite the target file (if exists)?'
                . "\n" . 'Type \'yes\' to continue:',
                ['yes'],
                '',
                'Aborted exporting config store.'
            )) {
                exit;
            }
        } elseif (!$this->command->preConfirmed && !$this->environment->confirm(
                'Export that config store from ' . (!$from_sources ? 'cache' : 'sources')
                . ' - will overwrite the target file (if exists)?'
                . "\n" . 'Type \'yes\' or \'y\' to continue:',
                ['yes', 'y'],
                '',
                'Aborted exporting config store.'
            )) {
            exit;
        }
        // Check if the command is doable.------------------------------
        // Nothing to check here.
        if ($store == 'global' && $container->has('config')) {
            /** @var IniSectionedConfig $config_store */
            $config_store = $container->get('config');
        } else {
            $config_class = static::CLASS_CONFIG;
            /** @var IniSectionedConfig $config_store */
            $config_store = new $config_class($store);
        }
        // Do it.
        if (!$config_store->export(
            $target_file,
            [
                'fromSources' => $from_sources,
                'format' => strtoupper($format),
                'unescaped' => $unescaped,
                'pretty' => $pretty,
            ]
        )) {
            $this->environment->echoMessage('Failed to export config store[' . $store . '].', 'error');
        } elseif (!$this->command->silent) {
            $this->environment->echoMessage(
                'Exported config store[' . $store . '] from ' . (!$from_sources ? 'cache' : 'sources')
                . ' to target file[' . $target_file . '].',
                'success'
            );
        }
        exit;
    }
516039
public function loadDoctrineConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$config = $this->validateConfig($this->defaults['configuration'], $this->config['configuration']);

		$logger = $builder->addDefinition($this->prefix('logger'))
			->setType(LoggerChain::class)
			->setAutowired('self');

		$configuration = $builder->addDefinition($this->prefix('configuration'));
		$configuration->setFactory(Configuration::class)
			->setAutowired(false)
			->addSetup('setSQLLogger', [$this->prefix('@logger')]);

		// SqlLogger (append to chain)
		if ($config['sqlLogger'] !== null) {
			$logger->addSetup('addLogger', [$config['sqlLogger']]);
		}

		// ResultCacheImpl
		if ($config['resultCacheImpl'] !== null) {
			$configuration->addSetup('setResultCacheImpl', [$config['resultCacheImpl']]);
		}

		// FilterSchemaAssetsExpression
		if ($config['filterSchemaAssetsExpression'] !== null) {
			$configuration->addSetup('setFilterSchemaAssetsExpression', [$config['filterSchemaAssetsExpression']]);
		}

		// AutoCommit
		Validators::assert($config['autoCommit'], 'bool', 'configuration.autoCommit');
		$configuration->addSetup('setAutoCommit', [$config['autoCommit']]);
	}
801109
public static function createFromTarget(TargetInterface $target, $drush_bin = 'drush')
  {
    $options = [];
    $alias = '@self';
    if ($target instanceof DrushTargetInterface) {
      $alias = $target->getAlias();
    }
    return new static($target, $drush_bin, $options, $alias);
  }