Skip to content

How to use default constants with PHP Attributes. #537

@beeyev

Description

@beeyev

phpdoc approach is working correctly as expected:

/**
 *  @OA\Server(
 *      url=L5_SWAGGER_CONST_HOST,
 *      description="L5 Swagger OpenApi dynamic host server"
 *  )
 */

But if I use PHP Attributes, it does not work:

#[OA\Server(url: 'L5_SWAGGER_CONST_HOST', description: 'L5 Swagger OpenApi dynamic host server')]

Is it possible to use dynamic constants inside Attributes ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions