This package is abandoned and no longer maintained. No replacement package was suggested.

Per-object configuration from class annotations

dev-master 2019-07-18 09:32 UTC

This package is auto-updated.

Last update: 2020-08-18 11:55:15 UTC


ApiGen Docs

Latest Stable Version Latest Unstable Version Build Status Coverage Status Scrutinizer Code Quality

License Buy Me Coffee

Per-object configuration from class annotations in PHP.


Install via Composer:

composer require tonybogdanov/class-config


Configure the library by calling ClassConfig::register(), choosing a cache directory, cache strategy and optionally a config class namespace, once and only once prior to using any of the features.

Add an autoload PSR-4 entry in composer.json and point the ClassConfig\Cache\ namespace (or the one you've configured) to the cache folder you chose.

Until doctrine/annotations reaches version 2.0 you'll also need to manually register the composer autoloader with the annotations' registry:

$loader = include 'vendor/autoload.php';
\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader([$loader, 'loadClass']);

Alternatively you can try indigophp/doctrine-annotation-autoload.


Run the tests:


Check the Coverage.



API Docs

Check the Docs