Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutiline string value in annoation are not parsed correctly #8239

Closed
etshy opened this issue Sep 28, 2023 · 4 comments
Closed

Mutiline string value in annoation are not parsed correctly #8239

etshy opened this issue Sep 28, 2023 · 4 comments

Comments

@etshy
Copy link

etshy commented Sep 28, 2023

Bug Report

Subject Details
Rector version 0.18.4

Multiline string value in annoation are not parsed correctly.

I have the following annotation

 /**
     * @OA\QueryParameter(name="orderBy", @OA\Schema(type="string"), required=false, description="List of value:
     *  - <b>TRY</b>: To try
     *  - <b>TEST</b>: to test (Default if no parameters given)")
     */
    public function test()
    {}

And description value is set to "ListOfValue
see the following rector diff

-     * @OA\QueryParameter(name="orderBy", @OA\Schema(type="string"), required=false, description="List of value:
-     *   - <b>TRY</b>: To try
-     *   - <b>TEST</b>: to test (Default if no parameters given)")
+    #[OA\QueryParameter(name: 'orderBy', schema: new OA\Schema(type: 'string'), required: false, description: '"Listofvalue')]

Minimal PHP Code Causing Issue

Will try to make a minimal repo reproduction later.

Expected Behaviour

description parsed value is the same multiline value as the original annoation (minus the * and extra space due to annotation)

@etshy etshy added the bug label Sep 28, 2023
@etshy
Copy link
Author

etshy commented Sep 28, 2023

here's a repo that reproduce the issue

@samsonasik
Copy link
Member

@etshy could you try provide a patch? Thank you.

@etshy
Copy link
Author

etshy commented Sep 28, 2023

I could try, i need to understand the parse a bit more though.
I'll take a look this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants