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

The "Nelmio\ApiDocBundle\Processor\MapRequestPayloadProcessor" class implements "OpenApi\Processors\ProcessorInterface" that is deprecated[Bug]: #2324

Closed
habib-halaoui opened this issue Jul 19, 2024 · 4 comments · Fixed by #2332
Labels

Comments

@habib-halaoui
Copy link

Version

master

Description

Hi, I have this deprecated message

The "Nelmio\ApiDocBundle\Processor\MapRequestPayloadProcessor" class implements "OpenApi\Processors\ProcessorInterface" that is deprecated. How i can solve It please ?

JSON OpenApi

JSON OpenApi
Replace this text with your JSON (`bin/console nelmio:apidoc:dump`)

Additional context

No response

@xammmue
Copy link

xammmue commented Jul 22, 2024

I think you can't do anything about it yourself (other then propose some code changes in nelmio of course).
Seems to be related to this other issue from one month ago: #2295

As it is just a deprecation message you shouldn't need to worry about it yet

@DjordyKoert
Copy link
Collaborator

A few weeks ago I tried to fix this but it seems to be more complex than it seems to fix this deprecation. I couldn't really figure out how to replace this with the new methods provided by swagger-php.

A PR is always welcome :)

@ThibaultPelloquin
Copy link

ThibaultPelloquin commented Jul 28, 2024

@DjordyKoert Hi!

I don't understand why this is a problem?

The ProcessorInterface was empty so it was not usefull, but it doesn't force you to use the Pipeline...

For me you can simply remove this from your three Processors :

# remove this
use OpenApi\Processors\ProcessorInterface

# remove the implements
final class (...)  implements ProcessorInterface

And in your ApiDocGenerator :

# remove this
use OpenApi\Processors\ProcessorInterface

# keep only array
* @return array<ProcessorInterface|callable> The array of processors

Or you can make your own ProcessorInterface, in the Processor directory with this in it :

public function __invoke(Analysis $analysis): void

and modify the 4 use listed on top ?

Have a nice day!

@DjordyKoert
Copy link
Collaborator

Yup that's my bad. I looked too deep into it and wanted to also fully remove all deprecated method calls at the same time (which is what I was struggling with).

Fix ready in #2332

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

Successfully merging a pull request may close this issue.

4 participants