You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to move extensions forwards to be more composer-friendly in the Drupal 8/9/10 ecosystem, I think it would be a good idea to start requiring extensions to ship with its own composer.json file with the basic minimal metadata.
In Drupal 8+, we start using composer to add Drupal components and we can include here Civi extensions. But because there's not (yet) a clear convention about how an extension must be shipped to be easily required in an external composer.json file, I'm proposing to start requiring (mandatory?) this..
Now a days many extensions already include composer.json file to define their required dependencies.. but usually those files do not have the basic attributes needed to be part of another composer.json (like name, description, and type) as composer "packages", and usually they need to be downloaded as "artifacts" or git repos, but no composer packages
So my proposal is to create on civix generate:module command the basic composer.json with this general format:
Most of the values can be copied from the original info.xml file, and free to be edited by the developer, but the one that shouldn't be changed is "type": "civicrm-extension". With that attribute an external composer.json file, can require this package and depending on the type execute different actions, like placing extensions in specific path
I think this issue goes over the scope of civix and needs some more global definitions and agreements in the Civi extensions ecosystem, by i think if we start creataing it in civix the adoption curve will be quicker.
Thoughts?
The text was updated successfully, but these errors were encountered:
In order to move extensions forwards to be more composer-friendly in the Drupal 8/9/10 ecosystem, I think it would be a good idea to start requiring extensions to ship with its own
composer.json
file with the basic minimal metadata.In Drupal 8+, we start using composer to add Drupal components and we can include here Civi extensions. But because there's not (yet) a clear convention about how an extension must be shipped to be easily required in an external composer.json file, I'm proposing to start requiring (mandatory?) this..
Now a days many extensions already include
composer.json
file to define their required dependencies.. but usually those files do not have the basic attributes needed to be part of anothercomposer.json
(like name, description, and type) as composer "packages", and usually they need to be downloaded as "artifacts" or git repos, but no composer packagesSo my proposal is to create on
civix generate:module
command the basiccomposer.json
with this general format:Most of the values can be copied from the original
info.xml
file, and free to be edited by the developer, but the one that shouldn't be changed is"type": "civicrm-extension"
. With that attribute an external composer.json file, can require this package and depending on the type execute different actions, like placing extensions in specific pathI think this issue goes over the scope of
civix
and needs some more global definitions and agreements in the Civi extensions ecosystem, by i think if we start creataing it incivix
the adoption curve will be quicker.Thoughts?
The text was updated successfully, but these errors were encountered: