Composer packages for functions. Bad form?

I just recently got in (learned) to create composer packs and want to distribute some of the features I've created over the years.

I understand that you can autoload function-only files using an autoloader files

, but I was wondering what the "best practice limit" is for doing this.

Namely: is it acceptable to distribute composer packages containing only features? How about single functions?

+3


source to share


1 answer


I think this is very acceptable.

The composer's documentation says:

It allows you to declare the dependent libraries you need for your project and will install them in your project for you.



If your features can be viewed as a software package, there is no reason you should not publish them via. composer. There are many compositing packages with only one class or even one interface.

But you should try to group the features that go into one composer-package.

+1


source







All Articles