Add support for PHPUnit 11

by @MauricioFauth

Some issues have been detected in this pull request

0
Coding Standard

0
Common Typos

0
File Permissions

0
Merge Commits

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/twigphp/Twig/4317/57c1f34e131270478dcea2e48648a28347f113cc/exception_messages.diff | patch -p0
diff -ru src/Test/IntegrationTestCase.php src/Test/IntegrationTestCase.php
--- src/Test/IntegrationTestCase.php	2024-09-13 18:00:29.320939072 +0000
+++ src/Test/IntegrationTestCase.php	2024-09-13 18:00:30.469979488 +0000
@@ -265,7 +265,7 @@
                     return;
                 }
 
-                throw new Error(\sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e);
+                throw new Error(\sprintf('"%s": "%s"', \get_class($e), $e->getMessage()), -1, null, $e);
             } finally {
                 restore_error_handler();
             }

0
Usage of void in test files

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/twigphp/Twig/4317/57c1f34e131270478dcea2e48648a28347f113cc/class_keyword.diff | patch -p0
diff -ru src/Test/IntegrationTestCase.php src/Test/IntegrationTestCase.php
--- src/Test/IntegrationTestCase.php	2024-09-13 18:00:29.320939072 +0000
+++ src/Test/IntegrationTestCase.php	2024-09-13 18:00:30.489980192 +0000
@@ -288,7 +288,7 @@
 
             if (false !== $exception) {
                 [$class] = explode(':', $exception);
-                $constraintClass = class_exists('PHPUnit\Framework\Constraint\Exception') ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception';
+                $constraintClass = class_exists(\PHPUnit\Framework\Constraint\Exception::class) ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception';
                 $this->assertThat(null, new $constraintClass($class));
             }
 

0
Deprecation Messages