mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1158: validate-schema does not warn about incorrect double @Entity annotation #1452
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 @doctrinebot on GitHub (May 18, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user jhartikainen:
If you have an incorrect annotation with two @Entity annotations, validate-schema does not correctly detect it. Instead, it displays a warning
PHP Notice: Trying to get property of non-object in library/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php on line 134
Additionally, this causes schema-tool update to display the same warning as well.
Here's the annotations which causes this:
While it's obviously an incorrect annotation, I would expect validate-schema to warn about it. The case with schema-tool is less clear, perhaps it could display an error instead of just a PHP notice and continuing fine otherwise.