-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@note
annotation causes error from Doctrine
#40
Comments
(FWIW, my opinion is remove the annotation and combine the description with the method description: /**
* Create many entities with persisting them to the database.
* To change the default value use {@see static::$cleanHeap} property.
*
* @param bool|null $cleanHeap Clean the heap after creating entities.
*/ It's not a valid annotation anyway, as far as i can tell. |
Exceptions stemming from Doctrine annotations are a common issue. The optimal solution involves configuring Doctrine to ignore specific annotations. This can be achieved with the following line of code: \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('note'); This code snippet should be inserted into a bootloader to guarantee its execution at an early stage in the application's lifecycle. Ensure that this bootloader is positioned at the beginning of the system's bootloader section for optimal effectiveness. |
Good to know, thanks for that! Obviously, comments shouldn't have to be scrutinized for functional impact, but here we are. It seems to me that if the code involved ( (Especially in this case where there seems to be no functional/documentation advantage to an invalid |
Among the changes in this commit are some annotations in the PhpDoc comments. The
@note
annotation is throwing errors duringconfigure
:With:
produces:
Removing
@note
:stops the error from occurring.
i presume the same will be true of the
createOne()
method.i'm happy to submit a change for these, if someone wants to offer an alternate annotation, or make the call to just remove
@note
from the remark...Suggestions?
The text was updated successfully, but these errors were encountered: