Skip to content

Commit

Permalink
Fixes #4501 to replace deprecated code in the config split recipe.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Madison committed Apr 12, 2022
1 parent 84d0e1a commit 0688646
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Robo/Commands/Recipes/ConfigSplitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Acquia\Blt\Robo\Exceptions\BltException;
use Acquia\Blt\Robo\Common\YamlMunge;
use Robo\Contract\VerbosityThresholdInterface;
use Twig\Loader\FilesystemLoader;
use Twig\Environment;

/**
* Defines commands in the recipes:config:init:splits namespace.
Expand All @@ -23,7 +25,7 @@ class ConfigSplitCommand extends BltTasks {
/**
* An instance of the Twig template environment.
*
* @var \Twig_Environment
* @var \Twig\Environment
*/
protected $twig;

Expand All @@ -49,8 +51,8 @@ class ConfigSplitCommand extends BltTasks {
public function initialize() {
$this->uuidGenerator = new Php();
$template_dir = $this->getConfigValue('blt.root') . '/scripts/config-split/templates';
$loader = new \Twig_Loader_Filesystem($template_dir);
$this->twig = new \Twig_Environment($loader);
$loader = new FilesystemLoader($template_dir);
$this->twig = new Environment($loader);
$docroot = $this->getConfigValue('docroot');
$this->configSyncDir = $docroot . '/' . $this->getConfigValue('cm.core.dirs.sync.path');
$this->configSplitDir = $docroot . '/' . $this->getConfigValue('cm.core.path') . '/envs';
Expand Down

0 comments on commit 0688646

Please sign in to comment.