Skip to content

Instantly share code, notes, and snippets.

@milo
Created December 8, 2014 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milo/7e0cd38c4ac869faef0c to your computer and use it in GitHub Desktop.
Save milo/7e0cd38c4ac869faef0c to your computer and use it in GitHub Desktop.
Why local composer dependencies bothers (sucks)

This is reaction to article Using local packges as composer dependencies.

The described technique bothers for two main things (mentioned on the article end):

  • after every dependency package change (even one single character) you have to commit changes
  • after that you have to call composer update (on big project, you have to wait few seconds for autoload.php is created)

My best technique is:

  • create project by composer with all dependencies
  • drop developed dependencies from composer.json and run composer update (or just delete them in vendor folder)
  • clone all dependencies into project/libs-dev/... subdirecotries (or link them by file system links)
  • index them by RoboLoader or similar
  • develop
  • when satisfied, commit changes into dependent packages
  • public releases
  • drop composer.json changes
@geomorillo
Copy link

geomorillo commented Feb 7, 2019

Or simply don't use composer at all...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment