π First Stable Release
This is the first stable release of php-asyncapi-annotations, providing comprehensive support for the AsyncAPI 3.0.0 specification using modern PHP 8.3+ attributes.
β¨ Highlights
- β Complete AsyncAPI 3.0.0 Support - Full implementation of all AsyncAPI objects and properties
- β 34 PHP Attributes - Modern PHP 8.3+ attributes with strict typing
- β 20+ Protocol Bindings - Kafka, MQTT, AMQP, HTTP, WebSockets, and more
- β Full Security Support - OAuth2, API Keys, HTTP Auth, SASL mechanisms
- β PSR-12 Compliant - Follows PSR-12 coding standards and PSR-4 autoloading
- β Production Ready - Comprehensive test suite and code quality tools
π¦ Installation
composer require drmmr763/php-asyncapi-annotationsπ Features
Core AsyncAPI 3.0.0 Support
- Complete implementation of AsyncAPI 3.0.0 specification
- Full support for all AsyncAPI objects and properties
- Modern PHP 8.3+ attributes with strict typing
- PSR-4 autoloading standard
AsyncAPI Objects
AsyncApi- Root document object for the API specificationInfo- Metadata about the API (title, version, description, etc.)Contact- Contact information for the APILicense- License information for the APIExternalDocumentation- External documentation referencesTag- Tags for logical grouping and categorization
Server Objects
Server- Server connection detailsServers- Collection of server definitionsServerVariable- Variables for server URL template substitutionServerBindings- Protocol-specific server definitions for all supported protocols
Channel Objects
Channel- Shared communication channel definitionsChannels- Collection of channel definitionsParameters- Channel address parametersParameter- Individual parameter definitionsChannelBindings- Protocol-specific channel definitions for all supported protocols
Message Objects
Message- Message definitions with headers, payload, and metadataMessages- Collection of message definitionsMessageTrait- Reusable message traitsMessageExample- Message examplesMessageBindings- Protocol-specific message definitions for all supported protocolsCorrelationId- Message tracing and correlation identifiers
Operation Objects
Operation- Send/receive operation definitionsOperations- Collection of operation definitionsOperationTrait- Reusable operation traitsOperationReply- Request-reply operation definitionsOperationReplyAddress- Reply address definitionsOperationBindings- Protocol-specific operation definitions for all supported protocols
Schema Objects
Schema- JSON Schema definitions with full AsyncAPI 3.0.0 supportMultiFormatSchema- Multi-format schema support (JSON Schema, Avro, etc.)
Security Objects
SecurityScheme- Security scheme definitions supporting:- User/Password authentication
- API Keys (header, query, cookie)
- X.509 certificates
- Symmetric/Asymmetric encryption
- HTTP authentication (Basic, Bearer, etc.)
- OAuth 2.0 flows
- OpenID Connect
- SASL mechanisms (Plain, SCRAM-SHA-256, SCRAM-SHA-512, GSSAPI)
OAuthFlows- OAuth 2.0 flow configurationsOAuthFlow- Individual OAuth 2.0 flow definitions
Components Object
Components- Reusable component definitions for:- Schemas, Servers, Channels, Operations, Messages
- Security Schemes, Server Variables, Parameters
- Correlation IDs, Operation Replies, Reply Addresses
- External Documentation, Tags
- Operation Traits, Message Traits
- Server/Channel/Operation/Message Bindings
Protocol Bindings Support
Complete protocol-specific bindings for:
- HTTP, WebSockets (ws), Kafka, Anypoint MQ
- AMQP 0-9-1, AMQP 1.0, MQTT (3.1.1), MQTT 5
- NATS, JMS, Amazon SNS, Solace, Amazon SQS
- STOMP, Redis, Mercure, IBM MQ
- Google Cloud Pub/Sub, Apache Pulsar
Reference Support
Reference- $ref pointer support for reusable components
Specification Extensions
- Full support for custom
x-*extension fields on all objects
π§ Code Quality
- β PSR-12 coding standards compliance
- β PHPStan static analysis at maximum level
- β PHPMD (PHP Mess Detector) integration with custom ruleset
- β PHP_CodeSniffer integration with strict 120 character line length
- β Comprehensive PHPUnit test suite with 16 tests and 77 assertions
- β 100% strict typing enforcement
π Documentation
- Comprehensive README.md with usage examples
- Complete API reference for all attributes
- Installation and requirements documentation
- CHANGELOG.md with detailed release notes
- MIT License
π οΈ Configuration Files
composer.json- Package configuration with all dependenciesphpunit.xml- PHPUnit test configurationphpstan.neon- PHPStan static analysis configurationphpcs.xml.dist- PHP_CodeSniffer PSR-12 configurationphpmd.xml- PHPMD custom ruleset configuration
π Full Changelog
See CHANGELOG.md for complete details.
Requirements: PHP 8.3 or higher