All abstract classes and classes MUST include a VERSION constant. Because class constants are always accessible outside the class scope, this allows for updates and possibly handling future compatibility issues. For reference purposes the const definition is usually included on the first line in the class definition:

<!--?php <br ?--> class FooBar
{
const VERSION = '0.1.0-alpha.1';
 
// <...>
}


If the class file contains an initial DocBlock, the PHPDoc @version tag MUST be set to the currently defined VERSION:

<!--?php <br ?--> /**
* Foo Bar
*
* @version 0.1.0-alpha.1
*/
class FooBar
{
const VERSION = '0.1.0-alpha.1';
 
// <...>
}


The SetupInterface interface in the StoreCore\Modules namespace additionally prescribes the implementation a getVersion() method. This formalizes an important reminder: classes and modules MUST include a publicly accessible version ID.

<!--?php <br ?--> namespace StoreCore\Modules;
 
interface SetupInterface
{
public function getVersion();
public function install();
public function uninstall();
}