zf-fr / zfr-shopify

Guzzle client around Shopify API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide config

bakura10 opened this issue · comments

@danizord, when do you think you will be able to release your Expressive config merger? So we could provide some default config on such libraries.

@bakura10 seems like Zend\Expressive already found a way to build modular applications: http://zend-expressive.readthedocs.org/en/latest/cookbook/modular-layout/ so I'm not sure if I should release that one after all.

It does not seem as transparent as your solution. You have to add a class per "module" (which introduces again the issue of adding framework specific classes to generic libraries), and you have to explicitly add each library.

Your solution seemed more transparent: just add composer extra and boom were done. We don't even need of setting caching as it would be aggregated by Composer directly.

Or did I misunderstood this feature?

Envoyé de mon iPhone

Le 6 janv. 2016 à 02:45, Daniel Gimenes notifications@github.com a écrit :

@bakura10 seems like Zend\Expressive already found a way to build modular applications: http://zend-expressive.readthedocs.org/en/latest/cookbook/modular-layout/ so I'm not sure if I should release that one after all.


Reply to this email directly or view it on GitHub.

Obviously there are still some advantages like being able to control the order of merging. Mmmhh.

Envoyé de mon iPhone

Le 6 janv. 2016 à 02:45, Daniel Gimenes notifications@github.com a écrit :

@bakura10 seems like Zend\Expressive already found a way to build modular applications: http://zend-expressive.readthedocs.org/en/latest/cookbook/modular-layout/ so I'm not sure if I should release that one after all.


Reply to this email directly or view it on GitHub.

Also, the issue I'm seeing is that it's not really transitive. For instance if we have a module "Common" that uses "ZfrShopify" internally, we'll need to make sure to add the "ZfrShopify" module to the list, as well as any other dependencies that ZfrShopify may have too, hence forcing to scan dependencies of dependencies and add all of them to the list.

With your system, from what I understand this is completely automatic.

We don't even need of setting caching as it would be aggregated by Composer directly.

Yep

Obviously there are still some advantages like being able to control the order of merging. Mmmhh.

You can have some control by chaging the order in require section of composer.json

For instance if we have a module "Common" that uses "ZfrShopify" internally, we'll need to make sure to add the "ZfrShopify" module to the list, as well as any other dependencies that ZfrShopify may have too, hence forcing to scan dependencies of dependencies and add all of them to the list.

With your system, from what I understand this is completely automatic.

Yep.

So your system sounds superior to me?

Except for the low control of merging order (you can control the order of your direct dependencies but can't control the order of dependencies of dependencies), yes, it looks better, may I give it a try?