PHPackages                             ferror/asyncapi-doc-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. [API Development](/categories/api)
4. /
5. ferror/asyncapi-doc-bundle

ActiveLibrary[API Development](/categories/api)

ferror/asyncapi-doc-bundle
==========================

0.1.0-alpha.7(2y ago)828.3k↓90%3[4 issues](https://github.com/Ferror/asyncapi-doc-bundle/issues)[1 PRs](https://github.com/Ferror/asyncapi-doc-bundle/pulls)MITPHPPHP ^8.2CI passing

Since Jan 7Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/Ferror/asyncapi-doc-bundle)[ Packagist](https://packagist.org/packages/ferror/asyncapi-doc-bundle)[ RSS](/packages/ferror-asyncapi-doc-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (8)Dependencies (14)Versions (11)Used By (0)

Async API Symfony Bundle
========================

[](#async-api-symfony-bundle)

The library was inspired by [nelmio/api-doc-bundle](https://github.com/nelmio/NelmioApiDocBundle); To create a code-first experience for PHP and Symfony engineers. This piece of software enables you to document events and messages via PHP built-in Attributes.

Features

- Code-first async messages documentation
- Built-in ability to present code powered by [Async API React Component](https://github.com/asyncapi/asyncapi-react)
- Automated documentation powered by PHP Reflection

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

[](#installation)

```
composer require ferror/asyncapi-doc-bundle
```

```
// config/bundles.php
return [
    Ferror\AsyncapiDocBundle\Symfony\Bundle::class => ['all' => true],
];
```

```
# config/packages/asyncapi_doc_bundle.yaml
ferror_asyncapi_doc_bundle:
  asyncapi_version: '2.6.0' # Async API specification version (default: 2.6.0)
  title: 'Service Example API'
  version: '1.2.3' # Your API version
  events: # The event class namespace
    - Ferror\AsyncapiDocBundle\Tests\Examples\UserSignedUp
```

```
# config/routes.yaml
ferror_asyncapi_doc_bundle_yaml:
    path: /asyncapi.yaml
    controller: ferror.asyncapi_doc_bundle.controller.yaml
    methods: GET

ferror_asyncapi_doc_bundle_json:
    path: /asyncapi.json
    controller: ferror.asyncapi_doc_bundle.controller.json
    methods: GET

ferror_asyncapi_doc_bundle_html:
    path: /asyncapi
    controller: ferror.asyncapi_doc_bundle.controller.ui
    methods: GET
```

Minimal Usage
-------------

[](#minimal-usage)

> Async API Symfony Bundle will use Reflection to determine the type and name of properties.
>
> Check out the other example if you want to define them manually.

```
use Ferror\AsyncapiDocBundle\Attribute\Message;
use Ferror\AsyncapiDocBundle\Attribute\Channel;

#[Message(name: 'ProductCreated')]
#[Channel(name: 'product.created')] // optional
final readonly class ProductCreated
{
    public function __construct(
        public int $id,
        public float $amount,
        public string $currency,
        public bool $isPaid,
        public DateTime $createdAt,
        public Week $week,
        public Payment $payment,
        public array $products,
        public array $tags,
    ) {
    }
}
```

Usage
-----

[](#usage)

```
use Ferror\AsyncapiDocBundle\Attribute as AA;
use Ferror\AsyncapiDocBundle\Schema\Format;
use Ferror\AsyncapiDocBundle\Schema\PropertyType;

#[AA\Message(name: 'ProductCreated')]
#[AA\Channel(name: 'product.created')] // optional
final readonly class ProductCreated
{
    public function __construct(
        #[AA\Property(name: 'id', type: PropertyType::INTEGER)]
        public int $id,
        #[AA\Property(name: 'amount', type: PropertyType::FLOAT)]
        public float $amount,
        #[AA\Property(name: 'currency', type: PropertyType::STRING)]
        public string $currency,
        #[AA\Property(name: 'isPaid', type: PropertyType::BOOLEAN)]
        public bool $isPaid,
        #[AA\Property(name: 'createdAt', type: PropertyType::STRING, format: Format::DATETIME)]
        public DateTime $createdAt,
        #[AA\PropertyEnum(name: 'week', enum: Week::class)]
        public Week $week,
        #[AA\PropertyObject(name: 'payment', class: Payment::class)]
        public Payment $payment,
        #[AA\PropertyArrayObject(name: 'products', class: Product::class)]
        public array $products,
        #[AA\PropertyArray(name: 'tags', itemsType: 'string')]
        public array $tags,
    ) {
    }
}
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance50

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.5% 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 ~3 days

Total

8

Last Release

882d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/859d0bbd1ef0d0772cf6c515be1510752ba68743d03e84435ee7b2e6117a08f2?d=identicon)[Ferror](/maintainers/Ferror)

---

Top Contributors

[![Ferror](https://avatars.githubusercontent.com/u/17534504?v=4)](https://github.com/Ferror "Ferror (79 commits)")[![robert-sykes](https://avatars.githubusercontent.com/u/56603160?v=4)](https://github.com/robert-sykes "robert-sykes (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ferror-asyncapi-doc-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ferror-asyncapi-doc-bundle/health.svg)](https://phpackages.com/packages/ferror-asyncapi-doc-bundle)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[open-dxp/opendxp

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

9421.6k61](/packages/open-dxp-opendxp)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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