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. ferror/asyncapi-doc-bundle

ActiveLibrary

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

0.1.0-alpha.7(2y ago)828.0k↓47.4%3[3 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 2y 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 1mo ago

READMEChangelog (8)Dependencies (14)Versions (10)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

29

—

LowBetter than 59% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity46

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

835d 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

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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