`E2E_Cache_*Test` raises dependency-hell in D8
The end-to-end tests for the cache interfaces rely on the baseline tests from https://github.com/php-cache/integration-tests. This creates dependency-hell when trying to run tests on D8.
$ composer init ... $ composer require civicrm/civicrm-core:dev-master pear/validate_finance_creditcard:dev-master ... $ composer install --dev ... Nothing to install or update $ find -name SimpleCacheTest.php ...(no files)...
There is no way to prompt composer to give you the dependencies needed for running Civi's end-to-end tests.
You can work-around this in the top-level project by running:
composer require "cache/integration-tests:dev-master#b97328797ab199f0ac933e39842a86ab732f21f9"
But that's not sustainable...
You should be able to get the dependencies for E2E tests without knowing the exact SHA revision of a transitive dependency.
- Previously, we imported this code into
civicrm-packages.gitand made some alterations to allow it run well.
- IIRC, there was concern that it used the older PHPUnit base-class (
\PHPUnit_Framework_TestCase) instead of the newer PHP base-class (
- Later, we normalized the dependency - removing it from
civicrm-packages.gitand instead pulling the dependency via
In a more just world, that would be a good change.
Here are the problems:
- For running E2E tests on D8, you need to create a top-level project which is not CiviCRM. Consequently, it doesn't pull in the
- Even if there were a composer command to "go get the transitive dev dependencies for civicrm-core (but preferrably not all dev deps for the entire pkg tree)", the upstream
cache/integration-testsproject has not made a stable release that uses
\PHPUnit\Framework\TestCase. All the published versions on packagist use
\PHPUnit_Framework_TestCase. And in the time since we started using
dev-master, they've added an ill-declared dependency on
I don't see a good option here. Ideas:
cache/integration-tests. Give it a new name and a tagged version number. In
civicrm-core.git:composer.json, list this new package as a standard
composer's design (via patch or plugin) to allow pulling in supplemental dev deps for this situation. (Maybe something along the lines of merge-plugin?)