-1

PHPSpreadsheet uses Composer for installation (which was a pain on a windows PC using Netbeans but that's another story).

In the good old days you used to just drop a folder with the PHP files into a project, include them and off you went. Now the package includes folders of documentation, tests, examples, etc.

When installing code on a production machine it makes sense to only install the bare minimum to improve security and performance. Composer doesn't seem to let you do this. Removing un-needed folders like cache, composer, psr etc breaks the code.

Is there some way to clean up in Composer / PHPSPreadsheet so only the bare minimum of files are required. Under PHPExcel it was trivial but the dependency etc seem to go for miles using composer. To me it seems another example of bloatware and clever ideas run amuck.

Why would i want composer or similar runing everytime i make a call to create a spreadsheet on a production machine. I only want phpSpreadsheet. I've googled, checked docs etc but no information leaps out.

  • If your code does not run without these files, they are obviously neccessary. So is there any real problem with them? – Nico Haase Feb 10 '18 at 10:30
  • Personally, I'd far rather you did rather download that documentation and examples, and actually read it, because so many questions people ask here on SO wouldn't need asking if people did actually read that documentation or look at those examples.... and in the good old days before composer, I had to build nearly a dozen distributions with different content (with/without docs, with/without examples, with/without dependencies) which took a lot of time to build.... so you'd far rather I spent my time creating custom builds rather than working on the code itself – Mark Baker Feb 12 '18 at 00:23
  • And in the good old (even older) days, we had to include every dependency as part of the distribution, even if it was a library that you already had.... that's bloatware, composer reduces bloat, not increases it. – Mark Baker Feb 12 '18 at 00:31
  • nor does composer run every time you make a call to create a spreadsheet; it runs once, when you install the library – Mark Baker Feb 12 '18 at 00:34

1 Answers1

0

Composer does not run unless invoked on the command line. You are confusing the package installation and the code running. Composer is looking at the composer.json and .lock files. I looked at the size of the package - 12 megs on disk. Half is in docs and samples directories which I deleted and my code still ran. The rest is code or artifacts that I would not delete.

jhoskins98
  • 114
  • 5