mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Warning: Invalid argument supplied for foreach() #6569
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @paulhagen on GitHub (Nov 20, 2020).
I ran into this issue while trying to create a migration from an entity.
The attribute causing the error (a Many-To-One, Unidirectional) on doctrine:schema:validate
The error
The exception
The mapping for itself is correctly. If I remove the attribute with the annotation and run do:sc:va doctrine say
[OK] The mapping files are correct.If I undo the deletion and then invoke the command again the same message comes up. If I repeat this procedure again, the above error occurs again.
I can now reproduce the error as often as I want in this way.
@stof commented on GitHub (Nov 20, 2020):
which attribute are you talking about ?
@paulhagen commented on GitHub (Nov 20, 2020):
Full entity
/** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer", name="id") */ private int $id;The attribute
$kontaktis causing the issue.@ostrolucky commented on GitHub (Nov 20, 2020):
I'm sorry about there isn't anything in your post which would indicate this would be a problem in doctrine-bundle. Moving to ORM.
@lcobucci commented on GitHub (Nov 20, 2020):
@paulhagen it looks like you're using the cached annotation reader. Which cache driver you have configured? Have you tried to clean it up?
Also, you sometimes use the
ORMnamespace on the annotation and sometimes don't. I suggest you to make it consistent: