Composer and Plugins with their own dependencies created using bake

I created a local plugin (Foo) using bake

./bin/cake bake plugin Foo

now I want that plugin to define its own dependencies via its composer.json that gets created in

plugins/Foo/composer.json

If I edit plugins/Foo/composer.json manually I can’t seem to find a way to force composer to “see” these changes. For example if I’m making a plugin which relies on muffin/webservice and I add muffin/webservice to the plugins/Foo/composer.json and then run composer update in my apps root directory the dependency does not get installed.

Is it possible to install plugins in the root plugins folder and manage decencies this way?

What you are missing is to put your plugin on packagist. By this composer will recognize and use its dependecies

The question then is if I have a plugin thats local and I don’t want to publish it in packagist OR if I’m developing locally and I’m not ready to publish it yet then whats the solution for managing and installing the dependencies?

1 Like