Skip to content

Conversation

@petski
Copy link

@petski petski commented Jan 9, 2026

Q A
Branch? main for features / current stable version branch for bug fixes. Let me know if you consider this a feature or a bugfix please.
Tickets N/A
License MIT
Doc PR N/A
  1. Commit 4aeb82e ; When bumping from v4.1.23 to v4.2.11 I noticed the following wasn't allowed anymore in v4.2.11; resulting in a cannot call getDescription() on array.
use Symfony\Component\HttpFoundation\Response;
...
new Delete(responses: [Response::HTTP_NO_CONTENT => ['description' => 'Some description']]);

and must be replaced with:

use Symfony\Component\HttpFoundation\Response;
use ApiPlatform\OpenApi\Model\Response as OpenApiResponse;
...
new Delete(responses: [Response::HTTP_NO_CONTENT => new OpenApiResponse(description: 'Some description')]);

I found this (intentional?) BC break at runtime. If the correct annotation were in place, static analysis (phpstan in my case) would have found it earlier.

  1. Commit 5660e4d ; Flyby fix. Key of responses can also be an int (like 200, etc).

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