[php8-compact] Allow for CiviCRM to be installed by 3rd parties using composer on...
authorSeamus Lee <seamuslee001@gmail.com>
Wed, 16 Jun 2021 08:34:02 +0000 (18:34 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Sat, 19 Jun 2021 21:24:45 +0000 (21:24 +0000)
Fix unit test

composer.json
composer.lock
tests/phpunit/CRM/Upgrade/FormTest.php

index 6e15bd0388dd5fe9b76d69abf8dd117d6f7f838d..5765df6b981c54291c46aa2789b3cecb1a6b62a7 100644 (file)
@@ -42,7 +42,7 @@
     }
   },
   "require": {
-    "php": "~7.2",
+    "php": "~7.2 || ~8",
     "cache/integration-tests": "~0.17.0",
     "dompdf/dompdf" : "~1.0.0",
     "firebase/php-jwt": ">=3 <6",
index 48ef36a914801c6f380b0661e1809f50b937d649..6938b626a7226d09a859913c2a7fbe984d0aad0f 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "e7cca2de5a5b2bd54ac4c14b677845ed",
+    "content-hash": "806655f49ee4984e61d0c1bf7bcc0c88",
     "packages": [
         {
             "name": "adrienrn/php-mimetyper",
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
-        "php": "~7.2",
+        "php": "~7.2 || ~8",
         "ext-intl": "*",
         "ext-json": "*"
     },
index c5427e698abcc078163c274cc88003e377ace31d..d028bd82e2375e84b1fb8e442e87660cc1f6f665 100644 (file)
@@ -18,7 +18,7 @@ class CRM_Upgrade_FormTest extends CiviUnitTestCase {
     $composerJsonRequirePhp = preg_replace(';[~^];', '', $composerJson['require']['php']);
     $actualMajorMinor = preg_replace(';^[\^]*(\d+\.\d+)\..*$;', '\1', $composerJsonRequirePhp);
     $expectMajorMinor = preg_replace(';^(\d+\.\d+)\..*$;', '\1', \CRM_Upgrade_Incremental_General::MIN_INSTALL_PHP_VER);
-    $this->assertEquals($expectMajorMinor, $actualMajorMinor, "The PHP version requirements in CRM_Upgrade_Form ($expectMajorMinor) and composer.json ($actualMajorMinor) should specify same major+minor versions.");
+    $this->assertStringContainsString($expectMajorMinor, $actualMajorMinor, "The PHP version requirements in CRM_Upgrade_Form ($expectMajorMinor) and composer.json ($actualMajorMinor) should specify same major+minor versions.");
   }
 
 }