Problem/Motivation
The project page currently instructs users to install the module using:
composer require 'drupal/webform_bootstrap-webform_bootstrap:^1.0'
However, this package name is confusing and non-standard for Drupal modules.
The Git repository for this project does not include a composer.json, which results in Drupal.org packaging generating a synthetic Composer package name:
drupal/webform_bootstrap-webform_bootstrap
This differs from the expected convention:
drupal/webform_bootstrap
and may cause confusion for users and maintainers.
Steps to reproduce
Visit project page: https://www.drupal.org/project/webform_bootstrap
Follow Composer install instructions shown.
Note that the package name differs from standard Drupal naming conventions and from the project machine name.
Proposed resolution:
Add a proper composer.json file to the project repository with:
{
"name": "drupal/webform_bootstrap",
"type": "drupal-module",
"description": "Bootstrap styling integration for Webform module"
}
This will allow Drupal.org packaging to publish the module under the standard package name:
drupal/webform_bootstrap
Comments
Comment #3
joseph.olstadComment #6
mably commentedHas the problem really been fixed?
I haven't been able to install 1.0.1.
Comment #7
joseph.olstadOk so no, its probably not fixed. Do this instead:
composer require 'drupal/webform_bootstrap-webform_bootstrap:^1.0'Comment #8
mably commentedHere is Claude explanation, not verified it but seems plausible:
Why
composer require drupal/webform_bootstrap-webform_bootstraplooks weirdIt is a name-collision artefact on drupal.org's packagist, not a typo. There are two packages on
packages.drupal.orgclaiming the "webform_bootstrap" name:drupal/webform_bootstrap— type: metapackage, 194 versions (latest6.3.0-beta9)drupal/webform: *anddrupal/core: ^10.3 || ^11.0. It is the legacy alias for the old sub-module that used to live inside the Webform contrib project.drupal/webform_bootstrap-webform_bootstrap— type: drupal-module, 2 versions (1.0.0,1.0.1)How we got here
The
webform_bootstrapcode originally shipped as a sub-module bundled insidewebform/webform, atwebform/modules/webform_bootstrap/. Drupal.org's packagist auto-generates adrupal/{submodule_machine_name}alias for every sub-module of every contrib project, sodrupal/webform_bootstrapwas minted as a metapackage that just pulls in the parentdrupal/webform— and it inherits the whole 6.x version line of Webform (hence the 194 versions and the6.3.0-beta9latest).Webform 6.4.x dropped the bundled
webform_bootstrapsub-module. Someone then created a standalone replacement project at drupal.org/project/webform_bootstrap to restore that behaviour for Webform 6.4+.When the packagist generator processed the standalone project, the obvious name
drupal/webform_bootstrapwas already taken by the legacy metapackage alias. Drupal.org's generator falls back to thedrupal/{project_machine_name}-{module_machine_name}form when there is a collision, hencedrupal/webform_bootstrap-webform_bootstrap. The standalone project's owncomposer.jsonactually declaresname: drupal/webform_bootstrap, but the packagist generator ignores that field and uses its own derived name.Practical impact
composer require drupal/webform_bootstrap-webform_bootstrap:^1.0is correct and gets you the new standalone module.composer require drupal/webform_bootstrapis the legacy alias and pulls indrupal/webform— only useful on Webform 6.3 and earlier, where the sub-module still exists.composer.jsonline accordingly.Comment #9
liam morlandI don't think the
requiresection ofcomposer.jsonshould be there.drupal/coreis handled automatically based oncore_version_requirement.drupal/webformshould not be needed because it is fine to install this along side Webform 6.3.x. Doing so removes a warning from the status page.As it is, this can result in the installation of 6.x branch instead of a stable tag.
Comment #10
joseph.olstadOk @liam_morland , I think this commit will satisfy.
Comment #11
joseph.olstadhttps://www.drupal.org/project/webform_bootstrap/releases/1.0.3
Comment #12
joseph.olstad