Skip to content

Notifier trying to get /.git/HEAD #119

@davidsneighbour

Description

@davidsneighbour

Whenever I am having an exception this is connected to a tracking before and after where phpbrake tries to read /.git/HEAD:

20230121-20:53:40-Selection-001

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions