From cb70757de73871fa7f06d97b2d5e365ed738af5b Mon Sep 17 00:00:00 2001 From: DerManoMann Date: Fri, 9 Feb 2024 16:36:53 +1300 Subject: [PATCH] Prefer attributes over annotations --- README.md | 5 ++++- docs/index.md | 8 ++++++-- src/Generator.php | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b57e9afd..666ec29c 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,12 @@ # swagger-php Generate interactive [OpenAPI](https://www.openapis.org) documentation for your RESTful API using -[doctrine annotations](https://www.doctrine-project.org/projects/annotations.html) (optional as of version 4.8; if required the `doctrine/annotations` library must be installed in addition to swagger.php). +[doctrine annotations](https://www.doctrine-project.org/projects/annotations.html) (**optional as of version 4.8**; if required the `doctrine/annotations` library must be installed in addition to swagger.php). or [PHP attributes](https://www.php.net/manual/en/language.attributes.overview.php). +⚠️ `doctrine/annotations` is going to be deprecated in the future, so wherever +possible attributes should be used. + For a full list of supported annotations, please have look at the [`OpenApi\Annotations` namespace](src/Annotations) or the [documentation website](https://zircote.github.io/swagger-php/guide/annotations.html). ## Features diff --git a/docs/index.md b/docs/index.md index e84a4cbe..c2380d4e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,7 +20,10 @@ features: ### 2. Update your code -Add `swagger-php` attributes or annotations to your source code. +Add `swagger-php` attributes (or legacy annotations) to your source code. + +⚠️ `doctrine/annotations` is going to be deprecated in the future, so wherever +possible attributes should be used.