Repository: qossmic/deptrac (php)

Issue:
Remove support for PHP 7.4
PHP 7.4 is [not actively supported](https://www.php.net/supported-versions.php) for several months now by PHP and is only receiving security fixes. Maybe it is time to move to PHP 8+?

Pull request description:
Update to php 8.1
Closes #906

I suspect that workflows will fail because GitHub will use the old workflow and not the applied changes in this PR. OK, it seems that I was wrong.

Patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f47eed05..45e1329e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -18,7 +18,7 @@ jobs:
       matrix:
         include:
           - os: ubuntu-20.04
-            php-version: 7.4
+            php-version: 8.1
 
     steps:
       - name: "Checkout"
@@ -71,7 +71,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-20.04]
-        php-version: [7.4, 8.0, 8.1]
+        php-version: [8.1]
         experimental: [false]
         include:
           - os: ubuntu-20.04
diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index 67ed67ae..0da6b109 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -18,7 +18,7 @@ jobs:
       matrix:
         include:
           - os: ubuntu-20.04
-            php-version: 7.4
+            php-version: 8.1
 
     steps:
       - name: "Checkout"
@@ -47,7 +47,7 @@ jobs:
       matrix:
         include:
           - os: ubuntu-20.04
-            php-version: 7.4
+            php-version: 8.1
 
     steps:
       - name: "Checkout"
@@ -90,7 +90,7 @@ jobs:
       matrix:
         include:
           - os: ubuntu-20.04
-            php-version: 7.4
+            php-version: 8.1
 
     steps:
       - name: "Checkout"
diff --git a/README.md b/README.md
index 60b9e290..a9cb4f1e 100644
--- a/README.md
+++ b/README.md
@@ -50,6 +50,11 @@ php deptrac.phar
 php deptrac.phar analyse --config-file=deptrac.yaml
 ```
 
+In order to run Deptrac you need at least PHP 8.1.
+
+You can analyse projects that require an older PHP version as long as
+[nikic/php-parser](https://github.com/nikic/PHP-Parser) can parse it.
+
 ## Contribute
 
 Deptrac is in active development. We are looking for your suggestions and help
diff --git a/composer.json b/composer.json
index ea0dc53a..cebd7092 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
         }
     ],
     "require": {
-        "php": "^7.4 || ^8.0",
+        "php": "^8.1",
         "ext-json": "*",
         "composer/xdebug-handler": "^2.0",
         "jetbrains/phpstorm-stubs": "^2021.3",
@@ -50,7 +50,7 @@
     },
     "config": {
         "platform": {
-            "php": "7.4.20"
+            "php": "8.1"
         },
         "sort-packages": true,
         "allow-plugins": {
diff --git a/deptrac.php b/deptrac.php
index 82264853..8e339eb0 100755
--- a/deptrac.php
+++ b/deptrac.php
@@ -3,8 +3,8 @@
 use Composer\XdebugHandler\XdebugHandler;
 use Qossmic\Deptrac\Supportive\Console\Application;
 
-if (PHP_VERSION_ID < 70400) {
-    echo 'Required at least PHP version 7.4.0, your version: '.PHP_VERSION."\n";
+if (PHP_VERSION_ID < 80100) {
+    echo 'Required at least PHP version 8.1.0, your version: '.PHP_VERSION."\n";
     exit(1);
 }
 
diff --git a/docs/contributing.md b/docs/contributing.md
index a3d8618f..144fc087 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -14,7 +14,7 @@ your merge request can be accepted.
 
 ## Requirements
 
-- PHP in version 7.4 or above
+- PHP in version 8.1 or above
 - [Composer](https://getcomposer.org/)
 - `make`
 
diff --git a/docs/index.md b/docs/index.md
index e740110f..787d13c4 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -16,7 +16,7 @@ formatter you can visualize your layers, rules and violations.
 
 ## Requirements
 
-In order to run Deptrac you need at least PHP 7.4. We also support PHP 8.
+In order to run Deptrac you need at least PHP 8.1.
 
 You can analyse projects that require an older PHP version as long as
 [nikic/php-parser](https://github.com/nikic/PHP-Parser) can parse it.


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index ae37ef0a..38d1cf9d 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -17,7 +17,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-20.04]
-        php-version: [7.4, 8.0, 8.1]
+        php-version: [8.1]
         experimental: [false]
         include:
           - os: ubuntu-20.04
@@ -60,7 +60,7 @@ jobs:
       matrix:
         include:
           - os: ubuntu-20.04
-            php-version: 7.4
+            php-version: 8.1
 
     steps:
       - name: "Checkout"
@@ -99,7 +99,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-20.04]
-        php-version: [8.0, 8.1]
+        php-version: [8.1]
         experimental: [false]
         include:
           - os: ubuntu-20.04