PrestaShopCorp / module-lib-mbo-installer

A helper to ease the download and unzip of modules from the Addons Marketplace
Open Software License 3.0
3 stars 2 forks source link

Optional dependencies tied to PS versions #7

Open sowbiba opened 10 months ago

sowbiba commented 10 months ago

As discussed during the Architecture Guild I see two interesting things that could be added (not necesarily for a preliminary version):

A real example can be PS Accounts which depends on PS EventBus for 1.7 on ahead but for 1.6.x (In fact PS EventBus doesn't exists in 1.6). We could have some scenarios in the future.

Great work!

Originally posted by @Rzial in https://github.com/PrestaShopCorp/ADR-Architecture-Decision-Records/issues/35#issuecomment-1802006822

sowbiba commented 10 months ago

Thanks @Rzial

We can imagine a structure like this

{
    "dependencies": [
      {
        "name" : "ps_accounts",
         "ps_min_version" : "1.7.0",
         "ps_max_version" : "8.1.0"
      },
      {
        "name" : "ps_eventbus"
      }
    ]
}

If ps_min_version and ps_max_version are specified, if the shop version is not between these 2 values, the dependency will be ignored