Skip to content

v1.0.0 - Complete AsyncAPI 3.0.0 PHP Attributes Library

Latest

Choose a tag to compare

@drmmr763 drmmr763 released this 12 Nov 19:17
· 1 commit to main since this release

πŸŽ‰ 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 specification
  • Info - Metadata about the API (title, version, description, etc.)
  • Contact - Contact information for the API
  • License - License information for the API
  • ExternalDocumentation - External documentation references
  • Tag - Tags for logical grouping and categorization

Server Objects

  • Server - Server connection details
  • Servers - Collection of server definitions
  • ServerVariable - Variables for server URL template substitution
  • ServerBindings - Protocol-specific server definitions for all supported protocols

Channel Objects

  • Channel - Shared communication channel definitions
  • Channels - Collection of channel definitions
  • Parameters - Channel address parameters
  • Parameter - Individual parameter definitions
  • ChannelBindings - Protocol-specific channel definitions for all supported protocols

Message Objects

  • Message - Message definitions with headers, payload, and metadata
  • Messages - Collection of message definitions
  • MessageTrait - Reusable message traits
  • MessageExample - Message examples
  • MessageBindings - Protocol-specific message definitions for all supported protocols
  • CorrelationId - Message tracing and correlation identifiers

Operation Objects

  • Operation - Send/receive operation definitions
  • Operations - Collection of operation definitions
  • OperationTrait - Reusable operation traits
  • OperationReply - Request-reply operation definitions
  • OperationReplyAddress - Reply address definitions
  • OperationBindings - Protocol-specific operation definitions for all supported protocols

Schema Objects

  • Schema - JSON Schema definitions with full AsyncAPI 3.0.0 support
  • MultiFormatSchema - 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 configurations
  • OAuthFlow - 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 dependencies
  • phpunit.xml - PHPUnit test configuration
  • phpstan.neon - PHPStan static analysis configuration
  • phpcs.xml.dist - PHP_CodeSniffer PSR-12 configuration
  • phpmd.xml - PHPMD custom ruleset configuration

πŸ“– Full Changelog

See CHANGELOG.md for complete details.


Requirements: PHP 8.3 or higher