Feasibility of composer-packing for interface
-
I have two small libraries (up to 1 class) that are designed as composer packages, they do the same tasks, just different approaches.
Without the use of interfaces or abstractions, I led them to a uniform API, and I've got my hands chasing an interface for them. But writing the same interfaces in different repository-- somehow the conscience won't.
To the extent appropriate, an entire package (possibly a package) is available under one interface.
composer.json
Will it weigh more than the interface file? Any more beautiful decisions without the repository unit?
-
Come to the question practically.
Will anyone use both your limbs at once?
If your answer is No.Don't make progrets pump out the complex lyb hierarchy just to finish one file. I like libs with no addictions, they don't have a problem with them. Since they themselves cannot break any dependence, hemorrhoea is minimal. Then there's no point in the interface, it's a physical abstract that no one needs.
If your answer is Yeah.the meaning of three packages for two classes and one interface is zero. If anyone needs two lips at once, and they're so small, why do you even share it? Let him be alone with all the functions at once.
If your lips were wildly complex, with a bunch of code, different addictions, if both were used at once, then you could use a complex hierarchy of packages, it would be. practical The point.
Anyway, don't make it easy, the code won't be more beautiful.