I have a few plugins and intend to move them to a very common base with an abstract class.
The issue is that even if I apply solutions in order to avoid class duplications ( like EarnestoDev‘s answer for #31034 ) the system could end up with different versions of the abstract class if more of my plugins are present.
In order to avoid this I should update all my plugins when the abstract class is updated, but that seems to be an overkill.
Is there any other way to include classes only for a specific plugin rather than using namespaces?
Unfortunately there is no system in WordPress to handle dependencies and sharing components between extensions is a challenge.
The possible solutions roughly are:
If extensions are for private use (as opposed to being separately and publicly available) you can manage them as part of whole site stack – in version control or Composer (which I hope will get more traction for WP projects).