Support modules not in Composer to prevent "Undefined index: composer_deploy_git_hash"

Created on 20 August 2019, over 5 years ago
Updated 13 October 2024, 2 months ago

If a site has modules that have been installed manually, not via Composer, the following message will be generated:

Notice: Undefined index: composer_deploy_git_hash

Original report

After performing updates through composer updates we are seeing several warning messages appearing on the Reports Available Updates page.

Notice: Undefined index: composer_deploy_git_hash in composer_deploy_preprocess_update_project_status() (line 70 of modules/contrib/composer_deploy/composer_deploy.module).

It appears that the module assumes the composer_deploy_git_hash to be an available key but several loaded modules do not have that key assigned.

Not sure what the appropriate action would be to resolve this.

In the composer_deploy_system_info_alter function we are assigning it to the $package['source']['reference'] or NULL.

$info['composer_deploy_git_hash'] = isset($package['source']['reference']) ? $package['source']['reference'] : NULL;

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fuzzyjared

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024