- Request method needed to be lowerscase and specified arguments in constructor)
This commit is contained in:
parent
956ccbba1a
commit
063aba6040
@ -5,7 +5,10 @@ use function DI\autowire, DI\create, DI\get;
|
|||||||
use Negundo\Client\{ SoftwareConfig, Dump, Task, NegundoMiddleware };
|
use Negundo\Client\{ SoftwareConfig, Dump, Task, NegundoMiddleware };
|
||||||
|
|
||||||
return [
|
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),
|
NegundoMiddleware::class => autowire(NegundoMiddleware::class),
|
||||||
Dump::class => autowire(Dump::class),
|
Dump::class => autowire(Dump::class),
|
||||||
Task::class => autowire(Task::class),
|
Task::class => autowire(Task::class),
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class Curl implements TransportInterface {
|
|||||||
public function push(string $url, array $data) : object|null|bool
|
public function push(string $url, array $data) : object|null|bool
|
||||||
{
|
{
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers );
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers );
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class ExceptionHandler {
|
|||||||
'type' => $ex::class,
|
'type' => $ex::class,
|
||||||
'message' => $ex->getMessage(),
|
'message' => $ex->getMessage(),
|
||||||
'url' => ( ( 'on' === $serverData['HTTPS'] ) ? 'https' : 'http' ) . '://' . $serverData['HTTP_HOST'] . $serverData["REQUEST_URI"],
|
'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' => json_encode($ex->getTrace()),
|
||||||
'backtrace_string' => $ex->getTraceAsString(),
|
'backtrace_string' => $ex->getTraceAsString(),
|
||||||
'source' => ( new SourceCodeFormatter() )->generateFromException($ex),
|
'source' => ( new SourceCodeFormatter() )->generateFromException($ex),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user