Open przepompownia opened 5 years ago
The error you are describing should be related to something else.. but I agree that would be nice to have a better message in case of no meta data... the issue is that the last metadata driver is "annotation" that means that there are "always" metadata info for a class...
Indeed, I forgot to emphasize that in this example I have one-piece driver chain.
Why not appending at the end of the driver chain the nulldriver?
NullDriver at the end of chain does not resolve the problem of metadata missing by mistake. Maybe it make sense when we want to skip some metadata files. In this case element with no metadata is quietly skipped which (depending on what we want) may be against the need for the information what metadata file not found.
Steps required to reproduce the problem
Expected Result
Avoid using wrong type, and (more important) add related class name (and possibly expected metadata file paths when use Yaml or Xml driver) to exception message when no metadata found.
Actual Result
Currently we get a message
that does not contain needed information. The simplest way is to use conditional (
null === $metadata
) breakpoint to get more information.It is also bug due to
TypeError
ocurrence.