Why the Kirby update with Composer creates a \vendor folder?

After running composer install in the root-folder of Kirby, the update process creates a \vendor folder in the root-folder.
Is that correct?
I don’t like that \vendor folder. It is full with hundrets of files which I think, don’t have to be there.

This is how composer works, there isnt a way around it really. Its akin to the node_modules folder if you used to working with yarn / npm.

Those files do have to be there because Kirby and any plug-ins installed via composer will have dependencies in that folder, you will break the install if you upload without the vendor folder.

Its possible to install everything manually without using Composer, but not every plug-in out there is designed to be used without composer.

1 Like

Ok, then I will update the \kirby folder manually :slight_smile:

Another, similar question:
I assume to update php a library in \site\plugins\pluginname, I have to switch to that folder and run composer update and it will only update that specific plugin, right?

Not quite, you can just down load the plugin and install it manually without running composer if the plugin has a vendor folder in it already. If you look at the github repo, and see a vendor folder in there, then the author prepared it for manual install. If you just see a composer.json in there, they are expecting to install via composer only and a manual install may not work.

On a basic level when you run composer install in the root, it kind of sucks up all the vendor stuff in the plug-in folders and puts them all under one vendor folder in the root.

Technically, yes can run composer inside each plugins folder if you need to, but if your doing that, you may as well do it on the whole thing and save yourself a bunch of commands :slight_smile:

1 Like