From 51991d3a4ef1787dc95594fb7e92dc5141bcea33 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Fri, 17 Jul 2020 15:43:14 +0200
Subject: [PATCH] Get ready for composer 2

---
 .gitignore    | 5 +++--
 Utils.php     | 5 +++--
 composer.json | 4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore
index 7579f74..b2987a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
-vendor
-composer.lock
+/vendor/
+/.env
+/composer.lock
diff --git a/Utils.php b/Utils.php
index 845f68d..89c48f9 100644
--- a/Utils.php
+++ b/Utils.php
@@ -4,6 +4,7 @@ namespace LakeDrops\Component\Composer;
 
 use Composer\Composer;
 use Composer\Json\JsonFile;
+use Exception;
 
 /**
  * Manages composer.json files.
@@ -94,7 +95,7 @@ final class Utils {
     try {
       $jsonFile->write($this->content);
     }
-    catch (\Exception $ex) {
+    catch (Exception $ex) {
       // Let's ignore this, if composer.json is read-only there is a general problem.
     }
     return $this;
@@ -209,7 +210,7 @@ final class Utils {
       }
     }
 
-    if (\in_array($pattern, self::$ignoredGitPatterns, TRUE)) {
+    if (in_array($pattern, self::$ignoredGitPatterns, TRUE)) {
       return;
     }
 
diff --git a/composer.json b/composer.json
index 692b49e..679d45f 100644
--- a/composer.json
+++ b/composer.json
@@ -28,8 +28,8 @@
         "ext-json": "*"
     },
     "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,
-- 
GitLab