FriendsOfSymfony / FOSRestBundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony
http://symfony.com/doc/master/bundles/FOSRestBundle/index.html
MIT License
2.79k stars 708 forks source link

Allow RequestParam and FileParam to target class #2405

Closed flohw closed 3 months ago

flohw commented 4 months ago

Hi,

To be consistent across the different available params and be able to place them on class, it requires to add \Attribute::TARGET_CLASS to the RequestParam and FileParam.

I added the annotation for compatibility too.

Hopefully this can be merged and release before #2400 as they may be incompatible.

Thanks

[edit]: Actions seems to be broken due to composer.json or lock file. Not sure how to resolve. Let me know if I can help on this too.

flohw commented 3 months ago

Hi @goetas

Just saw you on the pr 2401 and was seeking for the maintainer. Hopefully I reached the right person to know how we could manage this PR. :slightly_smiling_face:

I thought it would be nice to be merged before and maybe make a release (hopefully not too late because of the last merge :worried: ) to allow a more flexible usage of the current attributes.

Please let me know if I need to target another branch or if the improvement will be merged once SF7 compatibility is achieved.

Thank you.

goetas commented 3 months ago

Ooo, I saw this too late... Sorry 😔

mbabker commented 3 months ago

Ooo, I saw this too late... Sorry 😔

I did copy it into #2400 so it's there.

flohw commented 3 months ago

No problem. Thank you.

I keep an eye on the bundle as a lot of people. Let us know if we can help on some issue or pr. I haven't seen a "good first issue" or something.

I will close this pr once the other is merged or close it now if you think it's more appropriate.

flohw commented 3 months ago

I looked at your comment and pr on the phone and didn't see that the other pr was merged and a release was made.

Thank you for allowing the update! :slightly_smiling_face: