PHP8 Attributes #165
Replies: 5 comments 2 replies
-
Ah, yeah I think this could be very useful. I'm not very familiar with the new Attribute system, and its been quite some time since I defined OpenAPI markup for a PHP project. Would I need to add a dependency on zircote/swagger-php, or can this be done with the built-in PHP8 Attribute classes? |
Beta Was this translation helpful? Give feedback.
-
Attributes are native to PHP from version 8: https://www.php.net/manual/en/language.attributes.overview.php |
Beta Was this translation helpful? Give feedback.
-
@PaulHendriks I have made a quick PR to add attribute property annotations to the output classes: https://github.com/dcarbone/php-fhir/pull/166/files Is this sufficient for your needs, or were you thinking of something different? |
Beta Was this translation helpful? Give feedback.
-
Yes, this looks like what i can use for our project 👍 |
Beta Was this translation helpful? Give feedback.
-
@PaulHendriks I have released v4.0.0-rc6 with this output. Let me know if you run into any issues! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd be nice to have PHP8 attributes with each model, so we can parse it in our online Swagger api documentation.
Is this something that you'd consider building into the builder?
Beta Was this translation helpful? Give feedback.
All reactions