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(7y 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 4d 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 26% 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

2561d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5329535?v=4)[Daniel Neto](/maintainers/danielneto)[@DanielNeto](https://github.com/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

[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k17](/packages/solspace-craft-freeform)[akeneo/pim-community-dev

Akeneo PIM, the future of catalog management is open!

1.0k624.1k86](/packages/akeneo-pim-community-dev)[koriym/attributes

An annotation/attribute reader

443.6M14](/packages/koriym-attributes)[hostnet/entity-tracker-component

Provides an event when a Tracked entity changes

16160.8k9](/packages/hostnet-entity-tracker-component)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k60](/packages/open-dxp-opendxp)[oat-sa/generis

TAO generis library

10148.8k121](/packages/oat-sa-generis)

PHPackages © 2026

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