1

I create a PHP web app that need number of dependencies. It uses Composer to handle it. Each dependency have many unused files such as tests files, doc, extra files etc that will not being used in production environment of my app. So how do I remove those files efficiently ? I need to do it for save disk space. For now I just go thru each package folder and delete it manually. Is there any such tool I can use ? thanks.

egig
  • 4,370
  • 5
  • 29
  • 50
  • 2
    Harddisks are cheap, programmers are expensive. – Halcyon Jan 20 '15 at 17:09
  • Maybe this could help a bit http://stackoverflow.com/questions/26930816/how-to-remove-unused-dependencies-from-composer – Whirlwind Jan 20 '15 at 17:11
  • Also make sure you backup your files before any removal :) – Whirlwind Jan 20 '15 at 17:14
  • Here https://github.com/composer/composer/issues/1750 was the discussion about excluding specific directories in composer. A lot of people have that issue, but I think this is not the role of the composer. "Composer is a tool for dependency management in PHP" you can read on its documentation page. Composer it is not a build system. It cannot and won't do things that are specific to build systems like maven, ant, rake, make or phing. If you are a PHP developer you can try **phing** which I was personally using. Or try some other one. – Sławomir Chrobak Jan 20 '15 at 18:22

0 Answers0