You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
| Q | A |
|---------------|---------------------------------------------------------------------------------------------------------------------------|
| Bug fix? | yes |
| New feature? | no <!-- please update src/**/CHANGELOG.md files --> |
| Deprecations? | no <!-- please update UPGRADE-*.md and
src/**/CHANGELOG.md files --> |
| Issues | Fix#2275 <!-- prefix each issue number with "Fix #", no need
to create an issue if none exists, explain below instead --> |
#2259 accidentally
removed the `class_exists` check for symfony/validator `Constraint`.
This currently causes applications using this bundle to fail because of
the missing symfony/validator dependency
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:
My BusinessDto class look like this:
route: /api/doc
Symfony version is 7.0.6
Additional context
No response
The text was updated successfully, but these errors were encountered: