The composer allows the installation of the entire package. Just installing the files necessary to run only one function that you need is almost impossible at all, because the required file / class may have code that needs another class.
How to define this class? Classes can be created using variables, the class name can be combined by several lines. Composer will need to detect and possibly execute code that creates class names.
If you are really worried about downloading too much code, you can search for a more suitable package with fewer files, install this package yourself and remove what you donβt need, or just simply use it the way it is.
source share