Issues with the extension name vs key while building
I've found an issue that relates with the way this component is reading the information from the extension and creates the relevant folder.
One example is stripe
(but many more are having the same issue). Here is how we include it into composer:
{
"name": "civicrm/extensions",
"description": "CiviCRM extensions",
"type": "civicrm-extension",
"require": {
"civicrm/stripe": "6.6.3"
},
"repositories": [
{
"type": "vcs",
"url": "https://lab.civicrm.org/extensions/stripe.git"
}
]
}
Now, due to this line , what is actually being created under the folder web/libraries/civicrm
is com.drastikbydesign.stripe
which is the key
of the extension and not the project name (shortname).
In the meantime, stripe is being downloaded under the vendor folder as stripe
and not as com.drastikbydesign.stripe
.
If stripe is including some JS/CSS, those will NOT be read in CiviCRM as Civi is searching for the folder web/libraries/civicrm/stripe
and not web/libraries/civicrm/com.drastikbydesign.stripe
.
I can think of 2 possible solutions here:
- instead of the attribute
key
, use (?) the<file>
tag? - keep reading the attribute
key
as-is but also pass the actual folder name (which should be under the attributefile
)
Any thoughts?