Skip to content

Instantly share code, notes, and snippets.

@edwinheij
Created August 22, 2016 20:59
Show Gist options
  • Save edwinheij/2ce9d40bd4bbfc65fd8cafcce6e6b702 to your computer and use it in GitHub Desktop.
Save edwinheij/2ce9d40bd4bbfc65fd8cafcce6e6b702 to your computer and use it in GitHub Desktop.
composer package development with dependencies
develop your packages in a folder called, for example: packages/yourvendorname/packagename
push you package to git / packagist
after that, edit your main composer.json file so it will include you package (@section required)
now you autoloader knows about your package.
last but not least, the magic:
cd vendor/yourvendorname && rm -rf packagename && ln -s ../../packages/yourvendorname/packagename
now you can develop your package like it's in you live vendor directory.
so... now also you dependencies will load which you included in your 'required' section in your package composer.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment