symplify / monorepo-builder

Composer tools to maintain a monorepo
https://www.tomasvotruba.cz/blog/2019/02/18/how-we-automated-shopsys-packages-release-from-2-days-to-1-console-command/
MIT License
445 stars 37 forks source link

[Question] Composer install #69

Open alinceDev opened 9 months ago

alinceDev commented 9 months ago

Hi,

I don't get the point here. Say we have the following structure :

|- monrepo
    |- packages
         |- mylib
            composer.json
    |- web
         |- app
            composer.json
            composer.lock
composer.json

So when I release a version, all the dependencies are updated, but not the composer.lock. So in a CI I can't do a composer install. How do you handle this ? I also read this blog but not helped me https://blog.logrocket.com/hosting-all-your-php-packages-together-in-a-monorepo/

Thanks

kayw-geek commented 9 months ago

Usually, The structure as following:

|- monrepo
    |- packages
         |- mylib1
            composer.json
         |- mylib2
            composer.json
composer.json

merge composer context of all packages into the main composer.json (installed monorepo in this)

In the other project

 |- web
         |- app
            composer.json
            composer.lock

Install own libs

alinceDev commented 9 months ago

Ok, in my case I have this structure :

|- monrepo
    |- packages
         |- myBundle
            composer.json
    |- web
         |- app
            composer.json => myBundle
            composer.lock
         |- app2
            composer.json => myBundle
            composer.lock
         |- app3
            composer.json => myBundle
            composer.lock
          ......
composer.json

In that case, monorepo-builder is not adapted for that ?