diff --git a/composer.json b/composer.json index 7f02513..eb6aa0b 100644 --- a/composer.json +++ b/composer.json @@ -4,6 +4,9 @@ "keywords": [ "datadog", "polyfill" ], "license": "MIT", "type": "library", + "require": { + "php": ">=7.4" + }, "autoload": { "files": [ "src/DDTrace.php", diff --git a/src/DDAppsec.php b/src/DDAppsec.php index 82c74db..65b340c 100644 --- a/src/DDAppsec.php +++ b/src/DDAppsec.php @@ -4,11 +4,11 @@ if (!extension_loaded('ddappsec')) { - function track_user_login_success_event($userId, $metadata) + function track_user_login_success_event($userId, $metadata, $automated = null) { } - function track_user_login_failure_event($userId, $exist, $metadata) + function track_user_login_failure_event($userId, $exists, $metadata, $automated = null) { } diff --git a/src/DDTrace.php b/src/DDTrace.php index c7248f8..fe58ce5 100644 --- a/src/DDTrace.php +++ b/src/DDTrace.php @@ -4,7 +4,7 @@ if (!extension_loaded('ddtrace')) { - function add_global_tag($key, $value) + function add_global_tag(string $key, string $value) { } @@ -16,11 +16,11 @@ function root_span() { } - function start_span() + function start_span(float $startTime = 0) { } - function close_span() + function close_span(float $finishTime = 0) { } @@ -28,11 +28,17 @@ function trace_id() { } - function trace_method() + /** + * @param \Closure|array|null $tracingClosureOrConfigArray + */ + function trace_method( + string $className, + string $methodName, + $tracingClosureOrConfigArray = null) { } - function set_user($userId, $metadata = [], $propagate = false) + function set_user(string $userId, array $metadata = [], ?bool $propagate = null) { } }