composer.{json,lock} - Make the "tplaner/when" exception for old PHP reproducible
authorTim Otten <totten@civicrm.org>
Tue, 5 Nov 2019 04:40:14 +0000 (20:40 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 5 Nov 2019 04:45:22 +0000 (20:45 -0800)
Overview
--------

The library `tplaner/when` has an inaccurate dependency on php71 and
requires special work to deploy on php70.

Before
------

The `composer.lock` file was manually edited to make it runnable on php70.
However, if you `rm composer.lock && composer install`, then it fails.

After
-----

The `composer.json` and `composer.lock` are more repeatable.  If you run
`rm composer.lock && composer install`, then it works.

Comments
--------

This adds a fairly ugly section.  However, the good news is that it should
be more transparent - which should make it easier to understand/remove
later.

As a general rule, we don't want to have `civicrm-core.git` depend on
packages/versions that aren't published.  This is a somewhat unusual
edge-case - this package/version is published via `packagist.org`.  If you
run without this on php71+, then you still get a valid/equivalent package.
All that we've done is to enable running on `php70` (when `civicrm-core` is
a root project).

composer.json
composer.lock

index 84ed89bd5d15d235feafda7cd397da334d1e06d3..acfb29bcb2d523db9064ebd51e97fff57fae23fa 100644 (file)
@@ -65,7 +65,7 @@
     "katzien/php-mime-type": "2.1.0",
     "civicrm/composer-downloads-plugin": "^2.0",
     "league/csv": "^9.2",
-    "tplaner/when": "dev-master#c1ec099f421bff354cc5c929f83b94031423fc80",
+    "tplaner/when": "~3.0.0",
     "xkerman/restricted-unserialize": "~1.1"
   },
   "require-dev": {
       "bash tools/scripts/composer/phpword-jquery.sh"
     ]
   },
+  "repositories": {
+    "tplaner-when-1ec099f421bff354cc5c929f83b94031423fc80": {
+      "type": "package",
+      "package": {
+        "version": "3.0.0+php53",
+        "dist": {"url": "https://github.com/tplaner/When/archive/c1ec099f421bff354cc5c929f83b94031423fc80.zip", "type": "zip"},
+        "name": "tplaner/when",
+        "type": "library",
+        "description": "Date/Calendar recursion library.",
+        "keywords": ["recurrence", "date", "time", "DateTime"],
+        "homepage": "https://github.com/tplaner/When",
+        "license": "MIT",
+        "authors": [{"name": "Tom Planer", "email": "tplaner@gmail.com"}],
+        "require": {"php": ">=5.3.0"},
+        "require-dev": {"phpunit/phpunit": "~4.0"},
+        "autoload": {"psr-4": {"When\\": "src/"}}
+      }
+    }
+  },
   "extra": {
     "downloads": {
       "*": {
index c188be07a7997360ae563b106f5e33a15bcbe0b8..3e8a14c5515853b15977dab5ce504faece0283a8 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": "ec0b6779b9262fd5c0b41d3eb4d5f109",
+    "content-hash": "fc2b275e88919949aad21babc71c1706",
     "packages": [
         {
             "name": "civicrm/civicrm-cxn-rpc",
         },
         {
             "name": "tplaner/when",
-            "version": "dev-master",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/tplaner/When.git",
-                "reference": "c1ec099f421bff354cc5c929f83b94031423fc80"
-            },
+            "version": "3.0.0+php53",
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/tplaner/When/zipball/c1ec099f421bff354cc5c929f83b94031423fc80",
-                "reference": "c1ec099f421bff354cc5c929f83b94031423fc80",
-                "shasum": ""
+                "url": "https://github.com/tplaner/When/archive/c1ec099f421bff354cc5c929f83b94031423fc80.zip"
             },
             "require": {
                 "php": ">=5.3.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "^4.0"
+                "phpunit/phpunit": "~4.0"
             },
             "type": "library",
             "autoload": {
                     "When\\": "src/"
                 }
             },
-            "notification-url": "https://packagist.org/downloads/",
             "license": [
                 "MIT"
             ],
             "description": "Date/Calendar recursion library.",
             "homepage": "https://github.com/tplaner/When",
             "keywords": [
+                "DateTime",
                 "date",
-                "datetime",
                 "recurrence",
-                "repeat",
                 "time"
-            ],
-            "time": "2019-01-11T21:59:13+00:00"
+            ]
         },
         {
             "name": "xkerman/restricted-unserialize",
                 {
                     "name": "Tobias Nyholm",
                     "email": "tobias.nyholm@gmail.com",
-                    "homepage": "https://github.com/nyholm"
+                    "homepage": "https://github.com/Nyholm"
                 },
                 {
                     "name": "Nicolas Grekas",
     "stability-flags": {
         "zetacomponents/mail": 20,
         "pear/validate_finance_creditcard": 20,
-        "tplaner/when": 20,
         "cache/integration-tests": 20
     },
     "prefer-stable": false,