I am writing a 1 page script to do a relatively simple task. So I decided to use Flourish Unframework which provides a bunch of cool classes that can used separately.
I only want to use specific classes, say fDatabase, however composer let's download the entire package!
I know I could just delete the unwanted files BUT is there a way that composer could just let me require specific files?
This is not what I am looking for because it's just autoload and note installing 1 file from an entire package.
please assist.
possible duplicate of this but has not been answered too!
Composer only allows installing the whole package. Only installing the files necessary to run the only one function you need is next to impossible to do in general, because the file/class you need might have code that needs one other class.
How to detect that class? Classes can be instantiated with variables, the classname could be concatenated with several strings. Composer would have to detect and possibly execute the code that creates class names.
If you are really concerned about uploading too much code, you could either search for a more appropriate package with less files, do the installation of this package yourself and remove the things you don't need, or simply just use it the way it is.