PHPackages                             danineto/annotations - 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. danineto/annotations

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

danineto/annotations
====================

Annotations are a mechanism for adding metadata information to source code.

v0.0.1(6y ago)1209MITPHPPHP &gt;=7.2

Since Jun 27Pushed 6y agoCompare

[ Source](https://github.com/danineto/annotations)[ Packagist](https://packagist.org/packages/danineto/annotations)[ RSS](/packages/danineto-annotations/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Annotations
===========

[](#annotations)

This library gives the capacity to implement custom annotations for PHP classes.

It extends all functionality of [Doctrine/Annotations](https://github.com/doctrine/annotations).

Requirements
------------

[](#requirements)

This library uses PHP 7.2+.

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

[](#installation)

It is recommended that you install the library [throught composer](https://getcomposer.org).

To do so, run the Composer command to install the latest stable version:

```
composer require danineto/annotations
```

If not using composer you must also include this library: [Doctrine/Annotations](https://github.com/doctrine/annotations).

Get Methods by Annotation
-------------------------

[](#get-methods-by-annotation)

The get methods by annotation allow you to retrieve the class methods that implement a particular annotation and particular parameters.

### Example using the AsMethod annotation

[](#example-using-the-asmethod-annotation)

```
use Danineto\Annotations\AsMethod;
use Danineto\Annotations\Common\AnnotationReader;

$class = new class
{
    /**
     * @AsMethod(name="getExample")
     */
    function method()
    {
        return true;
    }
};

$reader = new AnnotationReader()
$methods = $reader->getMethodByAnnotation($class, AsMethod::class, [
    'name' => 'getExample'
]);

var_dump($methods);
```

### Parameters

[](#parameters)

Get Methods By Annotation parameters are:

- `class` the class object with the annotation
- `annotation` the annotation to search
- `parameters` the parameters values for the annotation

License
-------

[](#license)

Annotations library is open-source software licensed under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2514d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff82ab826921be6ba1b0e822409c60a6f6271429cf0a63e6b6865c155213f86e?d=identicon)[danielneto](/maintainers/danielneto)

---

Top Contributors

[![danineto](https://avatars.githubusercontent.com/u/1786003?v=4)](https://github.com/danineto "danineto (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/danineto-annotations/health.svg)

```
[![Health](https://phpackages.com/badges/danineto-annotations/health.svg)](https://phpackages.com/packages/danineto-annotations)
```

###  Alternatives

[friendsofsymfony/comment-bundle

This Bundle provides threaded comment functionality for Symfony applications

460751.2k5](/packages/friendsofsymfony-comment-bundle)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[koriym/attributes

An annotation/attribute reader

433.4M12](/packages/koriym-attributes)[hostnet/entity-tracker-component

Provides an event when a Tracked entity changes

16158.1k4](/packages/hostnet-entity-tracker-component)[gomachan46/state-machine

simple state machine with annotations for PHP, inspired by AASM known as a Ruby state machine.

1893.9k](/packages/gomachan46-state-machine)[hostnet/accessor-generator-plugin-lib

Generate get, set, add, remove methods on the fly.

10118.9k](/packages/hostnet-accessor-generator-plugin-lib)

PHPackages © 2026

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