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 don't use these so not sure what way Doctrine + Symfony is expected :)
But I assume it must be fixed to a real existing class or service name without class: but another keyword.
What helped me locally to make Rector pass was this:
Description
If I use the following in a Doctrine Entity for the ID (via Trait, based by https://symfony.com/doc/current/components/uid.html#storing-uuids-in-databases):
i get the following error message with
--debug
:Reproduction
See https://github.com/scope-li/sulu_rector_uuid_generator_reproducer
composer install && vendor/bin/rector process src --dry-run --debug
Findings
The error occurs when I define a method in the repository that starts with
find
, which is a prefix for certain Magic methods in the Doctrine repository (see https://github.com/scope-li/sulu_rector_uuid_generator_reproducer/blob/main/src/Repository/ContentRepository.php#L42).The strange thing is that this leads to an error with
doctrine.uuid_generator
in the ID definition in the entity.If I choose a method name that does not start with
find
or use the class nameUuidGenerator::class
instead of the service namedoctrine.uuid_generator
it works (see https://github.com/scope-li/sulu_rector_uuid_generator_reproducer/blob/main/src/Entity/Content.php#L17).But I have to use
doctrine.uuid_generator
instead ofUuidGenerator::class
so that the setting for UUID v4 is valid and not v6 is created.The text was updated successfully, but these errors were encountered: