DCOM-44: Throw exception if known namespaced annotation is not found #644

Closed
doctrinebot opened this Issue Apr 5, 2011 · 4 comments

2 participants

@doctrinebot

Jira issue originally created by user @beberlei:

If we know that an annotation is namespaced and that the namespace exists we should throw an exception if the annotation specified does not exist, currently its just skipped which can be very nasty to debug.

@doctrinebot

Comment created by @beberlei:

Implemented

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by gediminasm:

For example my extensions are using same alias[vendor name] for all annotations. In this case each extension can be used independetly from others. And after this "fix" it couples all extensions and forces to autoload all annotations because in other case it will simply throw a fatal error, since class_exists now uses require without even checking if file exists.
Instead of fatal error ClassLoader maybe could throw an exception.

@doctrinebot

Comment created by @beberlei:

This change should not fatal through class_exists(). I dont change the autoloading behavior at all, i just throw an exception if the class was not found and annotation is namesapced

Johannes complained about this for the same reason (reusing vendor prefixes).

I find this quite annoying, because i constantly misstype annotations and get no error messages at all, the number of bug reports in this regard is also quite high. We have to find a solution for this

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment