Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifier trying to get /.git/HEAD #119

Open
davidsneighbour opened this issue Jan 21, 2023 · 0 comments
Open

Notifier trying to get /.git/HEAD #119

davidsneighbour opened this issue Jan 21, 2023 · 0 comments

Comments

@davidsneighbour
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant