Notifier trying to get /.git/HEAD
davidsneighbour opened this issue · comments
Patrick Kollitsch commented
Whenever I am having an exception this is connected to a tracking before and after where phpbrake tries to read /.git/HEAD
:
The error is located in vendor/airbrake/phpbrake/src/Notifier.php:505
Why is it trying to go from system root?
My setup is this:
// initialize tracking
$airbrakeId = Env::getString('AIRBRAKE_ID');
$airbrakeKey = Env::getString('AIRBRAKE_KEY');
// configure notifier for Airbrake
$notifier = new Notifier([
'projectId' => $airbrakeId,
'projectKey' => $airbrakeKey,
'appVersion' => Config::getVersion(),
//'rootDirectory' => Constants::getString('ROOT_DIR'),
'environment' => Config::getEnvironment(),
]);
// register error handlers
Instance::set($notifier);
$handler = new ErrorHandler($notifier);
$handler->register();
It tries to go for system root with rootDirectory
set and not set.
What might cause this behaviour? The actual error/exception is tracked properly.