Browse Source

DX: bump PHPUnit to v9, PHPUnit bridge to v6 and Prophecy-PHPUnit to v2

Dariusz Ruminski 3 years ago
parent
commit
56a13e6ab7
2 changed files with 13 additions and 25 deletions
  1. 5 5
      composer.json
  2. 8 20
      tests/TestCase.php

+ 5 - 5
composer.json

@@ -19,7 +19,7 @@
         "ext-tokenizer": "*",
         "composer/semver": "^3.2",
         "composer/xdebug-handler": "^2.0",
-        "doctrine/annotations": "^1.12",
+        "doctrine/annotations": "^1.13",
         "php-cs-fixer/diff": "^2.0",
         "symfony/console": "^4.4.20 || ^5.1.3 || ^6.0",
         "symfony/event-dispatcher": "^4.4.20 || ^5.0 || ^6.0",
@@ -35,17 +35,17 @@
     "require-dev": {
         "justinrainbow/json-schema": "^5.2",
         "keradus/cli-executor": "^1.5",
-        "mikey179/vfsstream": "^1.6.8",
+        "mikey179/vfsstream": "^1.6.10",
         "php-coveralls/php-coveralls": "^2.5.2",
         "php-cs-fixer/accessible-object": "^1.1",
         "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
         "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
         "phpspec/prophecy": "^1.15",
-        "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
-        "phpunit/phpunit": "^8.5.21 || ^9.5",
+        "phpspec/prophecy-phpunit": "^2.0",
+        "phpunit/phpunit": "^9.5",
         "phpunitgoodpractices/polyfill": "^1.5",
         "phpunitgoodpractices/traits": "^1.9.1",
-        "symfony/phpunit-bridge": "^5.2.4 || ^6.0",
+        "symfony/phpunit-bridge": "^6.0",
         "symfony/yaml": "^4.4.20 || ^5.0 || ^6.0"
     },
     "suggest": {

+ 8 - 20
tests/TestCase.php

@@ -24,26 +24,14 @@ use PHPUnitGoodPractices\Traits\ProphesizeOnlyInterfaceTrait;
 use Prophecy\PhpUnit\ProphecyTrait;
 use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
 
-// To ensure compatibility for different PHPUnit versions, we may need to inject the ProphecyTrait, if it's present.
-if (trait_exists(ProphecyTrait::class)) {
-    /**
-     * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
-     *
-     * @internal
-     */
-    abstract class InterimTestCase extends BaseTestCase
-    {
-        use ProphecyTrait;
-    }
-} else {
-    /**
-     * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
-     *
-     * @internal
-     */
-    abstract class InterimTestCase extends BaseTestCase
-    {
-    }
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+abstract class InterimTestCase extends BaseTestCase
+{
+    use ProphecyTrait;
 }
 
 /**