[Question]: Code breaks after updating from 4.25.2 to 4.25.3
WilllemThijs opened this issue · 2 comments
WilllemThijs commented
Version
4.25.3
Question
I got this error after updating from 4.25.2 to 4.25.3 (The error also persists in the newer versions).
Attempted to load class "Constraint" from namespace "Symfony\Component\Validator". Did you forget a "use" statement for "Doctrine\DBAL\Schema\Constraint"?
I figured out that the response part of my code caused the error:
#[OA\Response(response: 200, content: new Model(type: BusinessDto::class))]
public function business(Business $business): JsonResponse
{
....
}
My BusinessDto class look like this:
<?php
declare(strict_types=1);
namespace App\Business\Model;
class BusinessDto
{
public int $id;
public string $name;
}
route: /api/doc
Symfony version is 7.0.6
Additional context
No response
DjordyKoert commented
Thank you for the issue! It should be fixed in https://github.com/nelmio/NelmioApiDocBundle/releases/tag/v4.26.1
WilllemThijs commented
Thanks @DjordyKoert! It works.