From 349958695129a3f4df78ac305a199122f50b83b7 Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Sat, 12 Nov 2022 11:18:51 +0100
Subject: [PATCH 1/8] tests: fix test cases that where previously found as
 invalid

---
 tests/Parser/DocBlockParserTest.php | 22 ++++++++++++++++------
 tests/Parser/NodeVisitorTest.php    |  1 -
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/tests/Parser/DocBlockParserTest.php b/tests/Parser/DocBlockParserTest.php
index 657339df..299b45aa 100644
--- a/tests/Parser/DocBlockParserTest.php
+++ b/tests/Parser/DocBlockParserTest.php
@@ -298,7 +298,7 @@ public function getParseTests(): array
                     ],
                 ],
             ],
-            [
+            'Test that @throws with a dot at the end works' => [
                 '
                 /**
                  * @throws \InvalidArgumentException.
@@ -311,8 +311,14 @@ public function getParseTests(): array
                         'longDesc' => '',
                         'tags' => [
                             'throws' => [
-                                '\InvalidArgumentException.',
-                                '\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException.',
+                                [
+                                    '\InvalidArgumentException',
+                                    '',
+                                ],
+                                [
+                                    '\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException',
+                                    '',
+                                ],
                             ],
                         ],
                     ],
@@ -594,7 +600,7 @@ public function getParseTests(): array
                     ],
                 ]],
             ],
-            [
+            'Test that invalid @return format also works' => [
                 '/**
          * Prepares queries for adding users and
          * also create database and return query and message
@@ -630,8 +636,12 @@ public function getParseTests(): array
                                 'SQL query for add a user',
                             ],
                         ],
-                        'return' => [
-                            'array, $message',
+
+                        'return' => [ // Array from found tags.
+                            [ // First found tag.
+                                [['array', false]], // Array from data types.
+                                ', $message', // The description
+                            ],
                         ],
                     ],
                 ]],
diff --git a/tests/Parser/NodeVisitorTest.php b/tests/Parser/NodeVisitorTest.php
index f199f6a0..870d23a4 100644
--- a/tests/Parser/NodeVisitorTest.php
+++ b/tests/Parser/NodeVisitorTest.php
@@ -553,7 +553,6 @@ public function testAddTagFromCommentToMethodInvalidHint(): void
         );
         $this->assertSame(
             [
-                'The hint on "prop1" at @var is invalid: "\Illuminate\Support\Carbon;"',
             ],
             $errors
         );

From 7faf3958189ab67757b7ad8f26aacf46b4e45fb7 Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Fri, 11 Nov 2022 17:31:04 +0100
Subject: [PATCH 2/8] chore: update dependencies

---
 composer.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/composer.json b/composer.json
index 01110d93..6d8485f0 100644
--- a/composer.json
+++ b/composer.json
@@ -43,8 +43,7 @@
         "symfony/filesystem": "~3.4|~4.3|^5|^6",
         "symfony/yaml": "~3.4|~4.3|^5|^6",
         "symfony/process": "~3.4|~4.3|^5|^6",
-        "phpdocumentor/reflection-docblock": "~5.3",
-        "phpdocumentor/type-resolver": "1.6.*",
+        "phpdocumentor/reflection-docblock": "5.x-dev",
         "wdes/php-i18n-l10n": "^4.0",
         "code-lts/cli-tools": "^1.4.0",
         "erusev/parsedown": "^1.7"
@@ -72,6 +71,7 @@
         }
     },
     "prefer-stable": true,
+    "minimum-stability": "dev",
     "bin": [
         "bin/doctum.php"
     ],

From 39decff4025b920997e5278100e66ebf673bdc5a Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Sat, 12 Nov 2022 11:31:33 +0100
Subject: [PATCH 3/8] chore: make more tests run

---
 tests/composer-package-auto-test.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/composer-package-auto-test.sh b/tests/composer-package-auto-test.sh
index 3501c6d0..8ccd066a 100755
--- a/tests/composer-package-auto-test.sh
+++ b/tests/composer-package-auto-test.sh
@@ -27,6 +27,7 @@ recreateSetup() {
                 }
             }
         ],
+        "minimum-stability": "dev",
         "require": {
             "code-lts/doctum": "5.x-dev"
         }

From 393dc475de52c71b9017d831e7784b5dac339c3d Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Sat, 12 Nov 2022 11:47:45 +0100
Subject: [PATCH 4/8] chore: drop PHP 7.2 and 7.3

---
 .github/workflows/lint-and-analyse.yml | 4 ++--
 .github/workflows/tests.yml            | 8 ++++----
 CHANGELOG.md                           | 2 ++
 README.rst                             | 2 +-
 bin/doctum-binary.php                  | 8 ++++++--
 composer.json                          | 2 +-
 6 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/lint-and-analyse.yml b/.github/workflows/lint-and-analyse.yml
index 3302c20b..dacdc2b0 100644
--- a/.github/workflows/lint-and-analyse.yml
+++ b/.github/workflows/lint-and-analyse.yml
@@ -12,10 +12,10 @@ jobs:
         runs-on: ubuntu-latest
         steps:
             - uses: actions/checkout@v4
-            - name: Use php 7.2
+            - name: Use php 7.4
               uses: shivammathur/setup-php@v2
               with:
-                  php-version: 7.2
+                  php-version: 7.4
                   tools: composer:v2
             - name: Validate composer.json and composer.lock
               run: composer validate
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 5304b445..f96f3f7f 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -14,7 +14,7 @@ jobs:
         continue-on-error: ${{ matrix.experimental }}
         strategy:
             matrix:
-                php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
+                php-version: ["7.4", "8.0", "8.1", "8.2", "8.3"]
                 os: [ubuntu-latest]
                 experimental: [false]
                 composer-options: ['']
@@ -51,7 +51,7 @@ jobs:
         strategy:
             fail-fast: false
             matrix:
-                php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
+                php-version: ["7.4", "8.0", "8.1", "8.2", "8.3"]
                 os: [ubuntu-latest]
                 experimental: [false]
                 composer-options: ['']
@@ -83,7 +83,7 @@ jobs:
         strategy:
             fail-fast: false
             matrix:
-                php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
+                php-version: ["7.4", "8.0", "8.1", "8.2", "8.3"]
                 os: [ubuntu-latest]
                 experimental: [false]
                 composer-options: ['']
@@ -117,7 +117,7 @@ jobs:
         strategy:
             fail-fast: false
             matrix:
-                php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
+                php-version: ["7.4", "8.0", "8.1", "8.2", "8.3"]
                 os: [ubuntu-latest]
                 experimental: [false]
                 composer-options: ['']
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 042cae1e..a7d3edd7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased] - yyyy-mm-dd
 
+- Require PHP `7.4.26`
+
 ## [5.5.4] - 2023-12-16
 
 - Fix PHP 8.2 dynamic properties for configurations with the `language` key
diff --git a/README.rst b/README.rst
index 6ba2e19f..dd3edea5 100644
--- a/README.rst
+++ b/README.rst
@@ -23,7 +23,7 @@ Installation
 
 .. caution::
 
-    Doctum requires **PHP 7.2.20** or later.
+    Doctum requires **PHP 7.4.26** or later.
 
 Get Doctum as a `phar file`_:
 
diff --git a/bin/doctum-binary.php b/bin/doctum-binary.php
index 37082089..95b18913 100644
--- a/bin/doctum-binary.php
+++ b/bin/doctum-binary.php
@@ -1,7 +1,11 @@
 <?php
 
-if (PHP_VERSION_ID < 70220) {// 70 2 20
-    echo 'You need to use PHP 7.2.20 or above to run Doctum.' . PHP_EOL;
+if (PHP_VERSION_ID < 70426) {// 70 4 26
+    echo 'You need to use PHP 7.4.26 or above to run Doctum.' . PHP_EOL;
+    if (PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION === 4 && PHP_RELEASE_VERSION < 26) {
+        echo 'We decided not having an updated PHP 7.4 was not healthy and has security issues.' . PHP_EOL;
+        echo 'You can discuss about that with us on: https://github.com/code-lts/doctum/discussions.' . PHP_EOL;
+    }
     echo 'Current detected version: (' . PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . ') (' . PHP_VERSION_ID . ').' . PHP_EOL;
     exit(1);
 }
diff --git a/composer.json b/composer.json
index 6d8485f0..94ce4d62 100644
--- a/composer.json
+++ b/composer.json
@@ -35,7 +35,7 @@
         }
     ],
     "require": {
-        "php": "^7.2.20 || ^8.0",
+        "php": "^7.4.26 || ^8.0",
         "twig/twig": "^3.0",
         "nikic/php-parser": "^4.10",
         "symfony/console": "~3.4|~4.3|^5|^6",

From 9bf6c8f27bb78027225edc283610762a5bc245b3 Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Fri, 18 Nov 2022 14:10:00 +0100
Subject: [PATCH 5/8] chore(composer.json): force the hash of
 phpdocumentor/reflection-docblock

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index 94ce4d62..11b9abc3 100644
--- a/composer.json
+++ b/composer.json
@@ -43,7 +43,7 @@
         "symfony/filesystem": "~3.4|~4.3|^5|^6",
         "symfony/yaml": "~3.4|~4.3|^5|^6",
         "symfony/process": "~3.4|~4.3|^5|^6",
-        "phpdocumentor/reflection-docblock": "5.x-dev",
+        "phpdocumentor/reflection-docblock": "5.x-dev#566af9fb94c556de91562fcfcbc392f66680111b",
         "wdes/php-i18n-l10n": "^4.0",
         "code-lts/cli-tools": "^1.4.0",
         "erusev/parsedown": "^1.7"

From 66cad0fac418588dff5e0b7adc25c367107850fb Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 12 Mar 2023 13:45:39 +0100
Subject: [PATCH 6/8] chore(composer.json): update
 phpdocumentor/reflection-docblock

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index 11b9abc3..cc53e277 100644
--- a/composer.json
+++ b/composer.json
@@ -43,7 +43,7 @@
         "symfony/filesystem": "~3.4|~4.3|^5|^6",
         "symfony/yaml": "~3.4|~4.3|^5|^6",
         "symfony/process": "~3.4|~4.3|^5|^6",
-        "phpdocumentor/reflection-docblock": "5.x-dev#566af9fb94c556de91562fcfcbc392f66680111b",
+        "phpdocumentor/reflection-docblock": "5.x-dev#7b217217725dc991a0ae7b995041cee1d5019561",
         "wdes/php-i18n-l10n": "^4.0",
         "code-lts/cli-tools": "^1.4.0",
         "erusev/parsedown": "^1.7"

From 9f8743ec07c0070a25524a5261057810dac28bbc Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 12 Mar 2023 13:48:51 +0100
Subject: [PATCH 7/8] chore: update the phpstan baseline

---
 phpstan-baseline.neon | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 4fa8e5d2..260da969 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -1985,11 +1985,6 @@ parameters:
 			count: 1
 			path: tests/Parser/DocBlockParserTest.php
 
-		-
-			message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{'The hint on \"prop1\"…'\\} and array\\{\\} will always evaluate to false\\.$#"
-			count: 1
-			path: tests/Parser/NodeVisitorTest.php
-
 		-
 			message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{'Too much @return…'\\} and array\\{\\} will always evaluate to false\\.$#"
 			count: 1

From 8e823e457ced31cf2b617296b86b5d72071f7673 Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Thu, 21 Mar 2024 09:38:51 +0100
Subject: [PATCH 8/8] chore(composer.json): update
 phpdocumentor/reflection-docblock

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index cc53e277..df97ab82 100644
--- a/composer.json
+++ b/composer.json
@@ -43,7 +43,7 @@
         "symfony/filesystem": "~3.4|~4.3|^5|^6",
         "symfony/yaml": "~3.4|~4.3|^5|^6",
         "symfony/process": "~3.4|~4.3|^5|^6",
-        "phpdocumentor/reflection-docblock": "5.x-dev#7b217217725dc991a0ae7b995041cee1d5019561",
+        "phpdocumentor/reflection-docblock": "5.x-dev#f359e4f",
         "wdes/php-i18n-l10n": "^4.0",
         "code-lts/cli-tools": "^1.4.0",
         "erusev/parsedown": "^1.7"