Closed Kerion closed 10 months ago
Same error here
Please do the suggested change in Class DoctrineModule\Options\Authentication on line 83
from
protected mixed $credentialCallable;
to:
protected mixed $credentialCallable = null;
as temporary bypass I'll set a wrapper function in my configuration
// Until doctrine/DoctrineModule gets fixed, a wrapper function is needed
// ref: https://github.com/doctrine/DoctrineModule/issues/816
'credentialCallable' => static fn(mixed $identity, mixed $credentialValue): mixed => $credentialValue,
I looked at this with one of the more recent releases and I did not find a use case where $credentialCallable
would not be set. Setting this value is good security. Can you please expound on your reasons for not setting it?
@TomHAnderson My application integrates Doctrine in Laminas, and in this case is not set.
It is a simple update that:
@curzio-della-santa Please provide a PR with the suggested change and I'll happily review and merge it.
@driehle PR is ready, thanks for your attention.
An credentialCallable is optional in the Authentication-Options
Trying to Auth without credentialCallable results in the following Error (php8.2)
Error: Typed property DoctrineModule\Options\Authentication::$credentialCallable must not be accessed before initialization
Please Change Line 83 in Class DoctrineModule\Options\Authentication
From
protected mixed $credentialCallable = null;
To
protected mixed $credentialCallable = null;