Skip to content
Snippets Groups Projects
Commit 518c4690 authored by jurgenhaas's avatar jurgenhaas
Browse files

Get ready for composer 2

parent f7465912
No related branches found
Tags v3.1.2
No related merge requests found
......@@ -26,15 +26,15 @@
"require": {
"ext-json": "*",
"php": ">=7.2",
"composer-plugin-api": "^1.0.0",
"composer-plugin-api": "^1||^2",
"lakedrops/composer-json-utils": "^1.5.0",
"lakedrops/docker-traefik": "^1.2.0",
"lakedrops/dotenv": "^1.2.2",
"twig/twig": "^1.23.1||^2.12"
"twig/twig": "^1.23.1"
},
"require-dev": {
"composer/composer": "^1.5.0",
"phpunit/phpunit": "^4.8.0"
"composer/composer": "^1||^2",
"phpunit/phpunit": "^8.4"
},
"minimum-stability": "dev",
"prefer-stable": true,
......
......@@ -2,11 +2,14 @@
namespace LakeDrops\Docker4Drupal;
use Exception;
use LakeDrops\Component\Composer\BaseHandler;
use LakeDrops\Component\Dotenv\Dotenv;
use LakeDrops\DockerTraefik\Traefik;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Yaml\Yaml;
use Twig_Environment;
use Twig_Loader_Array;
/**
* Class Handler.
......@@ -26,9 +29,9 @@ class Handler extends BaseHandler {
* @param bool $overwrite
* Whether to overwrite existing config files.
*
* @throws \Twig_Error_Loader
* @throws \Twig_Error_Runtime
* @throws \Twig_Error_Syntax
* @throws \Twig\Error\LoaderError
* @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError
*/
public function configureProject($overwrite = FALSE) {
......@@ -75,8 +78,8 @@ class Handler extends BaseHandler {
}
// Provide all the required files.
$twig_loader = new \Twig_Loader_Array([]);
$twig = new \Twig_Environment($twig_loader);
$twig_loader = new Twig_Loader_Array([]);
$twig = new Twig_Environment($twig_loader);
$options['webRoot'] = $webRoot . '/';
$orig_ignored = FALSE;
foreach ($this->getFiles($projectRoot, $webRoot, $settingsPath, $options) as $template => $def) {
......@@ -405,7 +408,7 @@ class Handler extends BaseHandler {
exec('docker container inspect ' . $id, $output);
return json_decode(implode('', $output), TRUE)[0];
}
catch (\Exception $ex) {
catch (Exception $ex) {
// Ignore.
}
return [
......
......@@ -44,9 +44,9 @@ class Plugin extends BasePlugin {
* @param \Composer\Script\Event $event
* The event that triggered the call of this function.
*
* @throws \Twig_Error_Loader
* @throws \Twig_Error_Runtime
* @throws \Twig_Error_Syntax
* @throws \Twig\Error\LoaderError
* @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError
*/
public function configureProject(Event $event) {
/** @var Handler $handler */
......
......@@ -26,9 +26,9 @@ class UpdateCommand extends BaseCommand {
/**
* {@inheritdoc}
*
* @throws \Twig_Error_Loader
* @throws \Twig_Error_Runtime
* @throws \Twig_Error_Syntax
* @throws \Twig\Error\LoaderError
* @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError
*/
protected function execute(InputInterface $input, OutputInterface $output) {
parent::execute($input, $output);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment