PHPackages                             ashleydawson/class-meta-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ashleydawson/class-meta-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

ashleydawson/class-meta-bundle
==============================

Symfony bundle to add arbitrary metadata to classes and their constants by annotation

6.0.0(6y ago)15.9kMITPHPPHP &gt;=7.1CI failing

Since May 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/AshleyDawson/ClassMetaBundle)[ Packagist](https://packagist.org/packages/ashleydawson/class-meta-bundle)[ RSS](/packages/ashleydawson-class-meta-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Class Meta Bundle
=================

[](#class-meta-bundle)

Symfony bundle for my [Class Meta](https://github.com/AshleyDawson/ClassMeta) library. This allows you to attach arbitrary metadata to classes and their constants via annotation.

Installation
------------

[](#installation)

To install via composer, use the following command:

```
$ composer require ashleydawson/class-meta-bundle

```

And then add the bundle to the `AppKernel#registerBundles()` method:

```
$bundles = [
    // ...
    new AshleyDawson\ClassMetaBundle\AshleyDawsonClassMetaBundle(),
];
```

Configuration
-------------

[](#configuration)

Configuration allows you to set a cache provider. By default the cache provider is ArrayCache - so in production, I'd advise you change this to a more persistent cache strategy:

```
# app/config/config.yml

services:
    my_class_meta_cache_provider:
        class: Doctrine\Common\Cache\FilesystemCache
        arguments: [ "%kernel.cache_dir%/ashleydawson/class_meta" ]

ashley_dawson_class_meta:
    cache_provider_service_id: my_class_meta_cache_provider # Cache provider service ID (optional)
    cache_provider_ttl: 300 # 5 minutes TTL (optional)
```

*Note:* The cache is invalidated by file modify time, but if you want to also add a TTL (Time-to-live) to the cache it can be done via the `cache_provider_ttl` parameter.

*Note:* To disable the cache, simply pass the id of a `Doctrine\Common\Cache\VoidCache` service.

Basic Usage
-----------

[](#basic-usage)

To use the meta cache manager service in a controller, simply do:

```
public function indexAction()
{
    $meta = $this->get('ashleydawson.class_meta')->getClassConstantsMeta('AppBundle\Enum\MyEnum');

    dump($meta);
}
```

For more documentation, please see the [full library readme](https://github.com/AshleyDawson/ClassMeta/blob/master/README.md).

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~285 days

Total

5

Last Release

2553d ago

Major Versions

1.0.2 → 4.0.02017-12-12

4.0.0 → 5.0.02019-02-13

5.0.0 → 6.0.02019-07-04

PHP version history (2 changes)1.0.1PHP &gt;=5.4

5.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/958ec06d53fff9021d93c8728740d74bf348a3ad22a4fb22ef6c1de9ee7f4f7a?d=identicon)[AshleyDawson](/maintainers/AshleyDawson)

---

Top Contributors

[![AshleyDawson](https://avatars.githubusercontent.com/u/1968942?v=4)](https://github.com/AshleyDawson "AshleyDawson (7 commits)")[![jwilkinson87](https://avatars.githubusercontent.com/u/5273004?v=4)](https://github.com/jwilkinson87 "jwilkinson87 (2 commits)")

---

Tags

classmetadatametaannotationconstant

### Embed Badge

![Health badge](/badges/ashleydawson-class-meta-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ashleydawson-class-meta-bundle/health.svg)](https://phpackages.com/packages/ashleydawson-class-meta-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[fabianmichael/kirby-meta

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

7011.3k1](/packages/fabianmichael-kirby-meta)[antares/accessible

PHP library that allows you to define your class' getters, setters and constructor with docblock annotations.

123.9k1](/packages/antares-accessible)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
