Skip to content

vendor/composer/composer/src/Composer/installed.php: failed to open stream 2.1.0 #9937

@pookmish

Description

@pookmish

My composer.json:

{
    "name": "su-hsdo/suhumsci",
    "description": "Project template for Drupal 9 projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://github.com/SU-HSDO/suhumsci",
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "url": "https://git.drupalcode.org/issue/domain_301_redirect-2954889",
            "type": "vcs"
        },
        {
            "url": "https://git.drupalcode.org/issue/audio_embed_field-3146159",
            "type": "vcs"
        },
        {
            "type": "package",
            "package": {
                "name": "kenwheeler/slick",
                "version": "1.8.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/kenwheeler/slick/archive/1.8.0.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "^1.2.0"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "dinbror/blazy",
                "version": "1.8.2",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/dinbror/blazy/archive/1.8.2.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "^1.2.0"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "ckeditor-plugin/a11ychecker",
                "version": "1.1.1",
                "type": "drupal-library",
                "dist": {
                    "url": "https://download.ckeditor.com/a11ychecker/releases/a11ychecker_1.1.1.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "~1.0"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "ckeditor-plugin/balloonpanel",
                "version": "4.14.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://download.ckeditor.com/balloonpanel/releases/balloonpanel_4.14.0.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "~1.0"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "ckeditor-plugin/link",
                "version": "4.14.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://download.ckeditor.com/link/releases/link_4.14.0.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "~1.0"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "ckeditor-plugin/fakeobjects",
                "version": "4.14.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://download.ckeditor.com/fakeobjects/releases/fakeobjects_4.14.0.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "~1.0"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "ckeditor-plugin/liststyle",
                "version": "4.14.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://download.ckeditor.com/liststyle/releases/liststyle_4.14.0.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "~1.0"
                }
            }
        }
    ],
    "require": {
        "acquia/blt": "^12.0",
        "acquia/blt-simplesamlphp": "dev-master",
        "ckeditor-plugin/liststyle": "4.14.0",
        "composer/installers": "^1.9",
        "cweagans/composer-patches": "^1.7",
        "dinbror/blazy": "^1.8",
        "drupal/acquia_connector": "^3.0",
        "drupal/acquia_purge": "^1.1",
        "drupal/address": "^1.9",
        "drupal/addtocal": "^2.0",
        "drupal/admin_login_path": "^2.0",
        "drupal/admin_toolbar": "^3.0",
        "drupal/allowed_formats": "^1.3",
        "drupal/anchor_link": "^2.4",
        "drupal/asset_injector": "^2.7",
        "drupal/audio_embed_field": "dev-3146159-d9-ready",
        "drupal/auto_entitylabel": "^3.0@beta",
        "drupal/better_normalizers": "^1.0@beta",
        "drupal/block_class": "^1.3",
        "drupal/block_content_permissions": "^1.10",
        "drupal/block_field": "^1.0@RC",
        "drupal/bricks": "^2.0",
        "drupal/cancel_button": "^1.1",
        "drupal/chosen": "^3.0",
        "drupal/ckeditor_liststyle": "^1.4",
        "drupal/color_field": "^2.4",
        "drupal/colorbox": "^1.7",
        "drupal/components": "^2.0",
        "drupal/conditional_fields": "^1.0@alpha",
        "drupal/config_filter": "^1.0",
        "drupal/config_ignore": "^2.2",
        "drupal/config_pages_overrides": "^1.0@beta",
        "drupal/config_readonly": "^1.0@beta",
        "drupal/config_split": "^1.0",
        "drupal/config_update": "^1.7",
        "drupal/confirm_leave": "^1.0@beta",
        "drupal/content_access": "^1.0@alpha",
        "drupal/core-composer-scaffold": "^9",
        "drupal/core-project-message": "^9",
        "drupal/core-recommended": "~9.1.0",
        "drupal/default_content": "^2.0",
        "drupal/diff": "^1.0",
        "drupal/domain_301_redirect": "dev-2954889-d9-ready",
        "drupal/draggableviews": "^2.0",
        "drupal/ds": "^3.9",
        "drupal/eck": "^1.0@beta",
        "drupal/editor_advanced_link": "^1.8",
        "drupal/embed": "^1.4",
        "drupal/encrypt": "^3.0",
        "drupal/entity_embed": "^1.1",
        "drupal/entity_reference_exposed_filters": "^1.0@alpha",
        "drupal/entity_reference_revisions": "^1.3",
        "drupal/entityqueue": "^1.2",
        "drupal/environment_indicator": "^4.0",
        "drupal/extlink": "^1.5",
        "drupal/fakeobjects": "^1.1",
        "drupal/field_formatter_class": "^1.4",
        "drupal/field_group": "^3.1",
        "drupal/field_permissions": "^1.1",
        "drupal/fontawesome": "^2.17",
        "drupal/google_analytics": "^3.1",
        "drupal/honeypot": "^2.0",
        "drupal/imagemagick": "^3.1",
        "drupal/insert": "^2.0",
        "drupal/key": "^1.14",
        "drupal/layout_builder_component_attributes": "^1.1",
        "drupal/layout_builder_modal": "^1.1",
        "drupal/layout_paragraphs": "^1.0@beta",
        "drupal/masquerade": "^2.0@beta",
        "drupal/maxlength": "^1.0@RC",
        "drupal/menu_admin_per_menu": "^1.3",
        "drupal/menu_block": "dev-1.x",
        "drupal/menu_link_weight": "^1.0@beta",
        "drupal/menu_position": "^1.0@beta",
        "drupal/metatag": "^1.14",
        "drupal/migrate_source_csv": "^3.4",
        "drupal/mysql56": "^1.1",
        "drupal/node_revision_delete": "^1.0@RC",
        "drupal/paragraphs_edit": "^2.0@alpha",
        "drupal/path_redirect_import": "^1.0@beta",
        "drupal/pathauto": "^1.8",
        "drupal/porterstemmer": "^1.1",
        "drupal/printfriendly": "^3.5",
        "drupal/publishcontent": "^1.2",
        "drupal/rabbit_hole": "^1.0-beta4",
        "drupal/real_aes": "^2.3",
        "drupal/redirect": "^1.6",
        "drupal/role_delegation": "^1.1",
        "drupal/search_api": "^1.18",
        "drupal/seckit": "^2.0",
        "drupal/shield": "^1.4",
        "drupal/shortcut_menu": "^2.0",
        "drupal/slick_paragraphs": "^2.0",
        "drupal/smart_date": "^3.1",
        "drupal/smart_trim": "^1.3",
        "drupal/stage_file_proxy": "^1.1",
        "drupal/taxonomy_menu_ui": "^1.4",
        "drupal/term_condition": "^2.0",
        "drupal/ui_patterns": "^1.2",
        "drupal/ui_patterns_field_variants": "1.x-dev",
        "drupal/video_embed_field": "^2.4",
        "drupal/view_unpublished": "^1.0",
        "drupal/viewfield": "^3.0@beta",
        "drupal/views_block_filter_block": "^1.0",
        "drupal/views_bulk_edit": "^2.4",
        "drupal/views_bulk_operations": "^3.9",
        "drupal/views_data_export": "^1.0",
        "drupal/views_ical": "^1.0@alpha",
        "drupal/views_infinite_scroll": "^1.7",
        "drupal/views_taxonomy_term_name_depth": "^7.0",
        "drupal/webform": "^6.0",
        "drupal/xmlsitemap": "^1.0",
        "drupal/yearonly": "^9.0",
        "drush/drush": "^10.3",
        "harvesthq/chosen": "^1.8",
        "kenwheeler/slick": "^1.8",
        "onlyextart/colorbox": "dev-master#e58476becbc89dc671093d1bcd9f99b2167fa8f7",
        "sainsburys/guzzle-oauth2-plugin": "^3.0",
        "spatie/calendar-links": "~1.5.0",
        "su-sws/nobots": "^8.2",
        "su-sws/react_paragraphs": "^8.2",
        "su-sws/stanford_basic": "dev-8.x-2.x#9d6391431de1aefa93c4dfe671e309cef1496d81",
        "su-sws/stanford_fields": "^8.1",
        "su-sws/stanford_media": "^8.2",
        "su-sws/stanford_migrate": "^8.1",
        "su-sws/stanford_ssp": "^8.1",
        "su-sws/stanford_text_editor": "^8.1"
    },
    "require-dev": {
        "acquia/blt-drupal-test": "^1.0",
        "phpspec/prophecy-phpunit": "^2.0",
        "raveren/kint": "^3.1",
        "su-sws/blt-sws": "dev-main",
        "su-sws/drupal-dev": "^8.2"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "discard-changes": true
    },
    "scripts": {
        "post-drupal-scaffold-cmd": [
            "patch -p1 < patches/htaccess.patch"
        ]
    },
    "extra": {
        "enable-patching": true,
        "patches": {
            "drupal/addtocal": {
                "https://www.drupal.org/project/addtocal/issues/3197306": "https://www.drupal.org/files/issues/2021-04-09/field-token-values-not-cleared-when-empty-3197306-2.patch",
                "https://www.drupal.org/project/addtocal/issues/3200494": "https://www.drupal.org/files/issues/2021-02-26/1551026-smart_date.patch"
            },
            "drupal/anchor_link": {
                "https://www.drupal.org/project/anchor_link/issues/2958532": "https://www.drupal.org/files/issues/2019-01-11/anchor_link-linkit-support_2958532.patch"
            },
            "drupal/bricks": {
                "https://www.drupal.org/project/bricks/issues/3003176": "https://www.drupal.org/files/issues/2018-09-28/bricks-entity_usage-3003176.patch"
            },
            "drupal/conditional_fields": {
                "https://www.drupal.org/project/conditional_fields/issues/3191984": "https://www.drupal.org/files/issues/2021-01-21/3191984-3-notice-trying-to-access-offset-on-value-of-type-null.patch"
            },
            "drupal/config_ignore": {
                "https://www.drupal.org/project/config_ignore/issues/2857247": "https://www.drupal.org/files/issues/2020-01-11/support-for-export-2857247-44.patch",
                "https://www.drupal.org/project/config_ignore/issues/2865419": "https://www.drupal.org/files/issues/2020-07-20/config_ignore-wildcard_force_import.patch"
            },
            "drupal/core": {
                "https://www.drupal.org/project/drupal/issues/2999491": "https://www.drupal.org/files/issues/2020-10-06/2999491--reusable-title-display--56.patch",
                "https://www.drupal.org/project/drupal/issues/2981837": "https://www.drupal.org/files/issues/2019-05-22/findMigrationDependencies-null-process-value-2981837-5.patch",
                "https://www.drupal.org/project/drupal/issues/2925297": "https://www.drupal.org/files/issues/2019-09-26/core-typed_config_handle_missing_config-2925297-18.patch",
                "https://www.drupal.org/project/drupal/issues/3020876": "https://www.drupal.org/files/issues/2020-09-25/contextual_links_with_LB-3020876-38.patch",
                "https://www.drupal.org/project/drupal/issues/1349080": "https://www.drupal.org/files/issues/2021-04-02/1349080-487.patch"
            },
            "drupal/domain_301_redirect": {
                "https://www.drupal.org/project/domain_301_redirect/issues/3010370": "https://www.drupal.org/files/issues/2019-09-24/domain_301_redirect-roles-3010370-3.patch"
            },
            "drupal/ds": {
                "https://www.drupal.org/project/ds/issues/2939322": "https://www.drupal.org/files/issues/2020-01-07/ds-content_entity-2939322-11.patch"
            },
            "drupal/fakeobjects": {
                "https://www.drupal.org/project/fakeobjects/issues/3002953": "https://www.drupal.org/files/issues/2020-06-22/fakeobjects-missing_plugin-3002953-5.patch"
            },
            "drupal/google_analytics": {
                "https://www.drupal.org/project/google_analytics/issues/3178179": "https://www.drupal.org/files/issues/2020-11-19/3178179-13.patch"
            },
            "drupal/key": {
                "https://www.drupal.org/project/key/issues/2980072": "patches/contrib/key-encrypt-2980072-4.patch"
            },
            "drupal/linkit": {
                "https://www.drupal.org/node/2423093 & https://www.drupal.org/project/linkit/issues/2712951#comment-13833751": "https://www.drupal.org/files/issues/2020-09-23/linkit-for-link-field-2712951-190.patch"
            },
            "drupal/menu_link_weight": {
                "https://www.drupal.org/project/menu_link_weight/issues/3152926": "https://www.drupal.org/files/issues/2020-06-18/warnings-in-php-7-4-3152926-2.patch",
                "https://www.drupal.org/project/menu_link_weight/issues/2995896": "https://www.drupal.org/files/issues/2018-08-29/2995896-menu-admin-per-menu-support-fixes.patch"
            },
            "drupal/menu_position": {
                "https://www.drupal.org/project/menu_position/issues/3110502": "https://www.drupal.org/files/issues/2020-07-29/drupal-menu_position-WSOD-when-menu-parent-no-longer-exists-3110502-26.patch",
                "https://www.drupal.org/project/menu_position/issues/3146668": "https://www.drupal.org/files/issues/2020-06-08/drupal9_schemaexception-3146668-2.patch"
            },
            "drupal/paragraphs": {
                "https://www.drupal.org/project/paragraphs/issues/2895561": "https://www.drupal.org/files/issues/2021-05-06/paragraphs-2895561-32.patch"
            },
            "drupal/path_redirect_import": {
                "https://www.drupal.org/project/path_redirect_import/issues/3153871": "https://www.drupal.org/files/issues/2020-06-22/path_redirect_import-d9-3153871-4.patch"
            },
            "drupal/redirect": {
                "https://www.drupal.org/project/redirect/issues/3057250": "https://www.drupal.org/files/issues/2020-12-14/validation-issue-3057250-29.patch"
            },
            "drupal/simplesamlphp_auth": {
                "https://www.drupal.org/project/simplesamlphp_auth/issues/2124117": "https://www.drupal.org/files/issues/2020-02-01/2124117-6-reroll-14.patch",
                "https://www.drupal.org/project/simplesamlphp_auth/issues/2936889": "https://www.drupal.org/files/issues/2020-07-31/simplesamlphp_auth-avoid_unexpected_redirect-2936889-12-d8.patch"
            },
            "drupal/ui_patterns": {
                "patches": "patches/contrib/ui_patterns_views-preview.patch",
                "https://github.com/nuvoleweb/ui_patterns/issues/304": "https://patch-diff.githubusercontent.com/raw/nuvoleweb/ui_patterns/pull/318.diff"
            },
            "drupal/video_embed_field": {
                "https://www.drupal.org/project/video_embed_field/issues/2913925": "https://www.drupal.org/files/issues/2018-07-09/retrieve-title-2913925-5.patch"
            },
            "drupal/views_taxonomy_term_name_depth": {
                "https://www.drupal.org/project/views_taxonomy_term_name_depth/issues/2877249": "https://www.drupal.org/files/issues/2020-05-01/2877249_21.patch"
            },
            "su-sws/stanford_basic": {
                "D9 Update": "patches/contrib/stanford_basic.patch"
            }
        },
        "drupal-scaffold": {
            "locations": {
                "web-root": "docroot/"
            }
        },
        "installer-paths": {
            "docroot/core": [
                "type:drupal-core"
            ],
            "docroot/libraries/{$name}": [
                "type:drupal-library"
            ],
            "docroot/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "docroot/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "docroot/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "docroot/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "docroot/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "custom-installer": {
            "docroot/modules/stanford/{$name}/": [
                "type:stanford-module"
            ],
            "docroot/themes/stanford/{$name}/": [
                "type:stanford-theme"
            ],
            "docroot/profiles/stanford/{$name}/": [
                "type:stanford-profile"
            ],
            "docroot/libraries/{$name}/": [
                "type:component",
                "ckeditor/ckeditor",
                "enyo/dropzone",
                "components/jquery",
                "harvesthq/chosen"
            ],
            "vendor/{$vendor}/{$name}/": [
                "type:library"
            ]
        }
    },
    "autoload": {
        "psr-4": {
            "Humsci\\": "blt/src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Drupal\\Tests\\hs_basic_page\\": "docroot/modules/humsci/hs_basic_page/tests",
            "Drupal\\Tests\\hs_bugherd\\": "docroot/modules/humsci/hs_bugherd/tests",
            "Drupal\\Tests\\hs_courses_importer\\": "docroot/modules/humsci/hs_courses/modules/hs_courses_importer/tests",
            "Drupal\\Tests\\hs_field_helpers\\": "docroot/modules/humsci/hs_field_helpers/tests",
            "Drupal\\Tests\\hs_table_filter\\": "docroot/modules/humsci/hs_table_filter/tests"
        }
    }
}

Output of composer diagnose:

Checking composer.json: WARNING
The package "onlyextart/colorbox" is pointing to a commit-ref, this is bad practice and can cause unforeseen issues.
The package "su-sws/stanford_basic" is pointing to a commit-ref, this is bad practice and can cause unforeseen issues.
require.acquia/blt-simplesamlphp : unbound version constraints (dev-master) should be avoided
require.ckeditor-plugin/liststyle : exact version constraints (4.14.0) should be avoided if the package follows semantic versioning
require.drupal/ui_patterns_field_variants : exact version constraints (1.x-dev) should be avoided if the package follows semantic versioning
require.onlyextart/colorbox : unbound version constraints (dev-master#e58476becbc89dc671093d1bcd9f99b2167fa8f7) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys: FAIL
Missing pubkey for tags verification
Missing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: You are not running the latest stable version, run `composer self-update` to update (1.10.19 => 2.1.0)
Composer version: 1.10.19
PHP version: 7.4.9
PHP binary path: /usr/bin/php7.4
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020

(note, I have to run my global composer as V1 due to some platform dependencies on the nested dependencies.)

When I run this command:

vendor/bin/blt -vvv

I get the following output:

PHP Warning:  require([path]/vendor/composer/composer/src/Composer/installed.php): failed to open stream: No such file or directory in [path]/vendor/composer/composer/src/Composer/InstalledVersions.php on line 319
PHP Fatal error:  require(): Failed opening required '[path]/vendor/composer/composer/src/Composer/installed.php' (include_path='[path]/vendor/pear/archive_tar:[path]/vendor/pear/console_getopt:[path]/vendor/pear/pear-core-minimal/src:[path]/vendor/pear/pear_exception:.:/usr/share/php') in [path]/vendor/composer/composer/src/Composer/InstalledVersions.php on line 319

And I expected this to happen:

BLT Unknown

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
  -D, --define=DEFINE            Define a configuration item value. (multiple values allowed)
      --environment=ENVIRONMENT  Set the environment to load config from blt/[env].yml file.
      --site=SITE                The multisite to execute this command against.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help                                 Displays help for a command
  ..........

Downgrading to 2.0.14 solved the issue and I believe the issues comes from this commit: 82cffa1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions