Skip to content

fix: document processor and provider interface - #8446

Open
VincentLanglet wants to merge 1 commit into
api-platform:4.3from
VincentLanglet:phpdocs
Open

fix: document processor and provider interface#8446
VincentLanglet wants to merge 1 commit into
api-platform:4.3from
VincentLanglet:phpdocs

Conversation

@VincentLanglet

@VincentLanglet VincentLanglet commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
Q A
Branch? 4.3
Tickets Closes #..., closes #...
License MIT
Doc PR api-platform/docs#...

Hi @soyuka

The DeserializeProvider is throwing multiple exceptions.

But when writing

try {
      $this->providerInterface->provide(...)
} catch (...) {

}

we end up with a dead catch from PHPStan thinking the service/interface is throwing nothing.

Looking at other provider, lot of them are throwing exceptions. Same for processor.
So I think it's better to document it can throw, promoting usage of try/catch if wanted.

Ci is already failing ; but this PR is only about phpdoc

@VincentLanglet
VincentLanglet requested a review from dunglas August 11, 2026 10:21
@VincentLanglet
VincentLanglet requested review from soyuka and removed request for dunglas August 11, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant