adixon / ca.civicrm.logviewer

CiviCRM Log Viewer
Other
9 stars 11 forks source link

add composer.json #25

Closed sluc23 closed 2 weeks ago

mlutfy commented 2 weeks ago

@adixon ICYMI, this PR helps with managing updates with composer.

adixon commented 2 weeks ago

Thanks and for your explanation. Managing updates with composer sounds like an awesome idea.

mlutfy commented 2 weeks ago

Thanks! For reference, here is an example usage in composer.json (which Luciano shared with me a while back), copied from CiviCRM Spark:

{
   [...]

    "require": {
        "civicrm/activitystatus": "dev-master",
        "civicrm/aegirbackups": "dev-master",
        "civicrm/ducttape": "dev-master",
        "civicrm/civiexportexcel": "dev-master",
        "civicrm/civirules": "^3",
        "civicrm/easycopy": "dev-master",
        "civicrm/emailapi": "^2",
        "civicrm/firewall": "^1",
       [...]
   },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://lab.civicrm.org/extensions/activitystatus.git"
        },
        {
            "type": "vcs",
            "url": "https://lab.civicrm.org/extensions/aegirbackups.git"
        },
        {
            "type": "vcs",
            "url": "https://lab.civicrm.org/extensions/civiexportexcel.git"
        },
        {
            "type": "vcs",
            "url": "https://lab.civicrm.org/extensions/easycopy.git"
        },
      [... this is really a pain.. hopefully we can find a solution one day ... ]
}
adixon commented 2 weeks ago

Ah yes, the vcs/git composer bridge thingy.

I guess we're awaiting someone to set up a real composer repo and populate it with civicrm extensions?

mlutfy commented 2 weeks ago

Yep, exactly. It's probably not a high priority for most people, but it would definitely improve the developer experience. We would probably need to write our own thingy on top of the extdir PHP app (which runs on top of the extdir drupal module). Having a composer.json file in most extensions is already a nice improvement :)

demeritcowboy commented 2 weeks ago

https://lab.civicrm.org/infra/comex

mlutfy commented 2 weeks ago

ahh yes! Like most things, Tim thought about it 5 years ago.. Brooklyn sprint eh? :)

The README is a bit scary (builds zips and all), but I'll give it a shot at some point.

sluc23 commented 2 weeks ago

[Off-Topic]: just as a reference, we did set up our internal Gitlab as a Package Registry for Composer.. it's not that painful to do this configuration, so it would great to have https://lab.civicrm.org/ as the composer registry for civi extensions.

ref: https://docs.gitlab.com/ee/user/packages/package_registry/

mlutfy commented 2 weeks ago

@sluc23 Interesting - I had seen that, and it sounded complicated, but ends up being really easy. I tested it and opened an issue here: https://lab.civicrm.org/infra/gitlab/-/issues/45