Open xaben opened 2 weeks ago
I manager to solve this by adding the following to my AppServiceProvider:
$this->app->singleton(DoctrinePresenceVerifier::class);
$this->app->extend('validation.presence', fn () => app()->get(DoctrinePresenceVerifier::class));
A bit hacky but a step in the right direction. I can look into submitting a PR this weekend.
Laravel 11 upgrade not possible due to all the validations failing as service is not being overridden.
Package version, Laravel version
laravel-doctrine/orm 2.1.0 laravel/framework v11.10.0
Expected behaviour
LaravelDoctrine\ORM\Validation\DoctrinePresenceVerifier is returned when trying to fetch "validation.presence" service
Actual behaviour
Illuminate\Validation\DatabasePresenceVerifier is returned instead
Steps to reproduce the behaviour
Add an Exists validation as described in https://laraveldoctrine.org/docs/1.8/orm/validation