braadiv / swagger-php
swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations (PHP 8.4 LTS Modernized Fork)
Requires
- php: >=8.1 || ^8.2 || ^8.3 || ^8.4
- ext-json: *
- doctrine/annotations: ^1.7
- psr/log: ^1.1 || ^2.0 || ^3.0
- symfony/finder: ^2.2 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0
- symfony/yaml: ^3.3 || ^4.0 || ^5.0 || ^6.0 || ^7.0
Requires (Dev)
- composer/package-versions-deprecated: 1.11.99.2
- friendsofphp/php-cs-fixer: ^2.17 || ^3.0
- phpunit/phpunit: ^8.5.14 || ^9.5 || ^10.0 || ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
- zircote/swagger-php: v3.3.5
README
⚠️ This is a PHP 8.4 compatibility fork — NOT an original work.
Credits & Attribution
This package is a modernized fork of the original zircote/swagger-php, created and maintained by Robert Allen, Bob Fanger, and Martin Rademacher.
All original code, design, and intellectual property belong to the original author(s).
The only modifications made in this fork are:
- Fixing PHP 8.4 deprecation warnings (
implicit nullable parametersinAnalysis.phpandAnnotations\OpenApi.php) - Adding
#[\AllowDynamicProperties]toContext.php - Updating
composer.jsonto support PHP 8.1–8.4 LTS - Adding
"replace": {"zircote/swagger-php": "self.version"}as a drop-in replacement - Retaining 100% backward compatibility as a drop-in replacement
Why this fork?
Legacy packages and Yii2 OpenAPI extensions (such as genxoft/yii2-oas3) rely on the 3.x series of zircote/swagger-php. Under PHP 8.4 LTS, implicit nullable parameters and dynamic properties trigger E_DEPRECATED warnings. This fork provides a safe, drop-in replacement under PHP 8.4.
Installation
composer require braadiv/swagger-php
Original Package Information
| Original Package | zircote/swagger-php |
| Original Version | 3.3.4 |
| Original Authors | Robert Allen, Bob Fanger, Martin Rademacher |
| Original License | Apache-2.0 |
| Fork Maintainer | braadiv (github.com/braadiv) |
| PHP Compatibility | `>=8.1 |
Changes from Original
See CHANGELOG.md for a detailed list of all modifications.
License
This fork retains the same license as the original package (Apache-2.0).
All rights and credits belong to the original authors.