Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"main": "src/sentry-agent.php",
"output": "../bin/sentry-agent",
"alias": "sentry-agent.phar",
"alias": "sentry-agent",
"timestamp": "20250904"
}
10 changes: 9 additions & 1 deletion agent/src/sentry-agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
exit;
}

require $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';
if (class_exists('Phar') && Phar::running(false) !== '') {
// If running the .phar directly from ./vendor/bin/, we don't want to use $_composer_autoload_path since this
// will load the projects files and lead to ClassNotFound errors.
// We want to use the autoload.php from the phar itself.
require __DIR__ . '/../vendor/autoload.php';
} else {
// This works fine for local development or if running the phar from ./vendor/sentry/sentry-agent/bin/
require $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';
}

// @TODO: "sentryagent" with a 5 in front, it's a unused "user port": https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=5148
// Maybe there is a better way to select a port to use but for now this is fine.
Expand Down
Binary file modified bin/sentry-agent
Binary file not shown.
2 changes: 1 addition & 1 deletion bin/sentry-agent.sig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
52CA959C330A3E693A9977E17A16D8244AE7ECE1D807F8470D26FBB370A34F71E04731127DDBBC0EB5C73091023B20EB4A73754170322FF81EB037898AF5F667
08702101B575BBFB940A721633C715043D2230509868C02E738B28971A3700182F914BDA9A8AC9AC43BB3944E64DDEE50BD13499FB97082966B860BDBFCA9F18