Skip to content

Issue #20: Make things more consistent even if there is not yet a lock file.#23

Open
laryn wants to merge 1 commit intobackdrop-contrib:1.x-2.xfrom
laryn:2.x-issue-20
Open

Issue #20: Make things more consistent even if there is not yet a lock file.#23
laryn wants to merge 1 commit intobackdrop-contrib:1.x-2.xfrom
laryn:2.x-issue-20

Conversation

@laryn
Copy link
Member

@laryn laryn commented Feb 9, 2026

Fixes #20.

@sikofitt
Copy link
Contributor

sikofitt commented Feb 9, 2026

There is a new issue after apply this patch.

Enabling the composer_manager module works fine, but when enabling the composer_manager_sa module it yells about the autoload.php file.

RuntimeException: Autoloader not found: /var/www/html/files/vendor/autoload.php in composer_manager_register_autoloader() (line 184 of /var/www/html/modules/composer_manager/composer_manager.module).

Edit

I see now, that function throws if the autoloader isn't found. I think a try/catch block in the composer_manager_sa module would fix this.

@@ -83,12 +88,23 @@ function composer_manager_sa_vulnerabilities($lock_file, $force_refresh = FALSE)
// update the Composer autoloader may not be registered.
composer_manager_register_autoloader();
Copy link
Contributor

@sikofitt sikofitt Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
composer_manager_register_autoloader();
try {
composer_manager_register_autoloader();
} catch(\Exception $e) {
backdrop_set_message(t('Run composer update to create a composer autoload.php file.'), 'error');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure no errors on fresh install before rebuilding composer file

2 participants