Closed methodeprog closed 6 years ago
Hi,
Thank for the bug repport. What are you doing that triggers that error ?
I ve tried symfony Command make:crud just to generate a crud of an Entity and i get In ClassMetadataInfo.php line 3325 Notice: Trying to get property of non-object
////////////////////////////////////////////////////////////////////// For example : echo $user->name; // Trying to get property of non-object So if we we try to know more about this $user var_dump($user); // array(2) [] Its not an object echo $user->name; // Will give a bug Source: https://www.grafikart.fr/formations/deboguer-code-php/property-of-non-object ///////////////////////////////////////////////////////////////// First i ve tried to check my code, but first i mention that the error show me In ClassMetadataInfo.php line 3325
Thats why a open this issue perhaps something wrong on these lines...
We need the version of symfony and the doctrineBundle that you use and the entity that you passed as a parameter to give you any information on what went wrong but it's most likely not related to the classMetadata.
I use version Symfony 4.0.6 / doctrineBundle 2.7.x-dev / I use this command to generate an crud for my entity and sure the entity is clean : php bin/console make : crud so perhaps its in my code
@methodeprog I think you should re-open this issue on https://github.com/symfony/maker-bundle, as the make:crud
command comes from that bundle.
But, we will also need more information. The BEST thing would be the exact code of the entity that you are trying to generate the crud for and any mapping data if you use XML or YAML for entity mapping.
Closing for now as "not a doctrine bundle issue"
Dear Sir i use v2.6.1 and 2.7.x-dev
And in the vendor this
I dont know why this error in line 3325