Embeded composer #11343
Replies: 2 comments
-
With support of another community we have find https://github.com/pagekit/pagekit/blob/develop/app/installer/src/Package/PackageManager.php which looks like well in the principle. Do you have any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Some CMSs have built solutions like this, most notably Contao which integrated Composer with a GUI via https://github.com/contao/contao-manager - this isn't easy though I think it was quite a lot of effort. I don't think it should be a separate install though, most likely including the project's dependencies makes more sense if they are going to coexist in the same process. If dependency resolution fails then the update will fail before the vendor dir is touched so it shouldn't leave the site unusable. |
Beta Was this translation helpful? Give feedback.
-
I would like to give the user the possibility (via GUI) to manage available "packages" (modules/components) in my upcoming application.
I think composer could be used for this? That maybe in the
components
folder of the project there would be a customcomposer.json
, a customautoload.php
, so that it doesn't compromise the rest of the application when "optional" modules fail to install.Except that it could possibly lead to a clash of versions and class names.
Thus, I would have to somehow tell composer that this is already installed and it doesn't need to download it.
What do you think? Can compsoer be used inside a project as a companion component manager?
Beta Was this translation helpful? Give feedback.
All reactions