What is the Standard Procedure for Creating a Plugin


I want to create a plugin for cakephp/app but I am not really sure how to go about it…

At some point I need to create a repo for the plugin, thats a given, lets call that


Ok, now that I have that, if my hard drive busts or something I will need another repo that contains the app skeleton with a composer entry that requires SharpAgent, lets call that


Ok, that sounds great, however, now I want to create another plugin, but that leads to me creating yet another Demo repo, so now I create just one Demo repo, lets call it


Now my instinct at this point is to create git submodules inside PluginDemos of each plugin, ex: SharpAgent, however, we have composer involved now, is there a way for me to use require by composer and be able to push to SharpAgent from the PluginDemos repo?


So this is what I ended up doing, please let me know how it compares to your method(s)

Created Repos

 1) SharpAgent
 2) PluginDemos

Bash Commands

git clone ... PluginDemos
cd PluginDemos
git remote add upstream cakephp/app
git pull upstream master
composer install
bin/cake bake plugin SharpAgent
cd ..
git clone ... SharpAgent
mv PluginDemos/plugins/SharpAgent/* SharpAgent/
mv PluginDemos/plugins/SharpAgent/.* SharpAgent/
cd SharpAgent
git add . && git commit -m 'Shotgun Commit' && git push origin master
cd PluginDemos/
rm -rf plugins/SharpAgent
git submodule add plugins/SharpAgent SharpAgent.git