Is it appropriate to migrate features common to more than one project to a stand-alone package?

2

I build two packages in PHP, each of which performs quite distinct functions, but both implement practically the same interfaces and abstract classes.

Because of this I created a third package containing only the interfaces and abstract classes you use, ie this package contains the basic skeleton shared by the other two libraries. The interfaces are below the Contracts directory, and the Auxiliary and Connector directories have abstract classes:

Oneofthepackagesalreadyhasthestructure:

However, I think this organization does not seem very satisfactory. Any ideas on how to improve this, or even organization suggestions?

Note: Autoload loading is being done by composer

The idea is to separate in a package the abstract classes, interfaces and standard traits for 2 packages or more ...

    
asked by anonymous 22.11.2016 / 16:12

0 answers