DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
481 stars 149 forks source link

[Bug]: `datadog-setup.php` script is not usable when installed with composer.json #2730

Open VincentLanglet opened 1 week ago

VincentLanglet commented 1 week ago

Bug report

When downloading the datadog-setup.php file from the release it works fine https://github.com/DataDog/dd-trace-php/releases/tag/1.1.0. But when using a dependency tool like composer the script doesn't work since it try to work with url like

https://github.com/DataDog/dd-trace-php/releases/download/@release_version@/dd-library-php-@release_version@-x86_64-linux-gnu.tar.gz.

I assume it's because of the PR https://github.com/DataDog/dd-trace-php/pull/1463 (cc @labbati @morrisonlevi)

Since the version number is present (in VERSION file or similar) or can even be found with the composer.lock (With \Composer\InstalledVersion for instance), it would be great to auto-fill the @release_version@ placeholder.

This way

composer install datadog/dd-trace
php vendor/datadog/dd-trace/datadog-setup.php

would work without anything else.

PHP version

8.3.7

Tracer or profiler version

1.1.0

Installed extensions

Irrelevant

Output of phpinfo()

Irrelevant

Upgrading from

No response