It's probably best to show this on the real case:
Kdyby\Events\EventsManager::setPanel() needs argument of Kdyby\Events\Diagnostics\Panel
Kdyby\Events\Diagnostics\Panel implements Tracy\IBarPanel
- kdyby/events has tracy/tracy as an optional dependency
- =>
Tracy\IBarPanel may not exist
- but that does not matter because
Kdyby\Events\Diagnostics\Panel is never loaded at all
The problem is that DependencyChecker is still trying to load the Kdyby\Events\Diagnostics\Panel class:
DependencyChecker::calculateHash() iterates over all public methods of Kdyby\Events\EventsManager which of course includes the setPanel method
calculateHash calls DependencyChecker::hashParameters() which iterates over all parameters of the setPanel() method (which is only the panel parameters).
hashParameters calls PhpReflection::getParameterType($param)
getParameterType calls) $param->getClass()
- that will try to autoload the
Kdyby\Events\Diagnostics\Panel class
- which of course fail with
Fatal error: Interface 'Tracy\IBarPanel' not found
- (no ReflectionException to catch, just fatal error)
It's probably best to show this on the real case:
Kdyby\Events\EventsManager::setPanel()needs argument ofKdyby\Events\Diagnostics\PanelKdyby\Events\Diagnostics\PanelimplementsTracy\IBarPanelTracy\IBarPanelmay not existKdyby\Events\Diagnostics\Panelis never loaded at allThe problem is that DependencyChecker is still trying to load the
Kdyby\Events\Diagnostics\Panelclass:DependencyChecker::calculateHash()iterates over all public methods ofKdyby\Events\EventsManagerwhich of course includes thesetPanelmethodcalculateHashcallsDependencyChecker::hashParameters()which iterates over all parameters of thesetPanel()method (which is only the panel parameters).hashParameterscallsPhpReflection::getParameterType($param)getParameterTypecalls)$param->getClass()Kdyby\Events\Diagnostics\PanelclassFatal error: Interface 'Tracy\IBarPanel' not found