1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Composer 2 compatibility: Installed package manifest format change

This commit is contained in:
Nick Liu 2020-11-02 13:05:10 -06:00
parent 05df0716d5
commit 7c2860bec2
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -89,6 +89,11 @@ abstract class E107Base extends Base
{
$composer_installed_file = codecept_absolute_path("vendor/composer/installed.json");
$composer_installed = json_decode(file_get_contents($composer_installed_file));
if (property_exists($composer_installed, "packages"))
{
// Composer 2 format for the installed packages manifest
$composer_installed = $composer_installed->packages;
}
$installed_phpunit_php_code_coverage = current(array_filter($composer_installed, function ($element)
{
return $element->name == 'phpunit/php-code-coverage';