Skip to content

Commit

Permalink
Added stub for DDTrace\\Bridge\\dd_tracing_enabled. (#4)
Browse files Browse the repository at this point in the history
* Added stub for DDTrace\\Bridge\\dd_tracing_enabled.
This function "does not exist" when the extension is enabled,
but DD_TRACE_ENABLED=false.

* Remove PSR-4 autoloading

This isn't needed.
  • Loading branch information
mdjward authored Jun 8, 2021
1 parent e669cae commit c2d5f04
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
},
"require-dev": {
"datadog/dd-trace": "^0.59.0"
},
"autoload": {
"files": [
"stubs/functions.php"
]
}
}
10 changes: 10 additions & 0 deletions stubs/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,13 @@ function trace_id(): int
}
}
}

namespace DDTrace\Bridge {
if (!function_exists('DDTrace\\Bridge\\dd_tracing_enabled')) {
function dd_tracing_enabled(): bool
{
return false;
}
}
}

0 comments on commit c2d5f04

Please sign in to comment.