- Request method needed to be lowerscase and specified arguments in constructor)

This commit is contained in:
Dave M. 2026-07-07 19:56:14 +00:00
parent 956ccbba1a
commit 063aba6040
3 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,10 @@ use function DI\autowire, DI\create, DI\get;
use Negundo\Client\{ SoftwareConfig, Dump, Task, NegundoMiddleware };
return [
SoftwareConfig::class => create(SoftwareConfig::class)->constructor(getenvonce('NEGUNDO_SERVER'), getenvonce('NEGUNDO_HASH')),
SoftwareConfig::class => create(SoftwareConfig::class)->constructor(
serverUrl: getenvonce('NEGUNDO_SERVER'),
softwareHash: getenvonce('NEGUNDO_HASH'),
),
NegundoMiddleware::class => autowire(NegundoMiddleware::class),
Dump::class => autowire(Dump::class),
Task::class => autowire(Task::class),

View File

@ -15,7 +15,7 @@ class Curl implements TransportInterface {
public function push(string $url, array $data) : object|null|bool
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers );

View File

@ -28,7 +28,7 @@ class ExceptionHandler {
'type' => $ex::class,
'message' => $ex->getMessage(),
'url' => ( ( 'on' === $serverData['HTTPS'] ) ? 'https' : 'http' ) . '://' . $serverData['HTTP_HOST'] . $serverData["REQUEST_URI"],
'http_method' => $serverData['REQUEST_METHOD'],
'http_method' => strtolower($serverData['REQUEST_METHOD']),
'backtrace' => json_encode($ex->getTrace()),
'backtrace_string' => $ex->getTraceAsString(),
'source' => ( new SourceCodeFormatter() )->generateFromException($ex),