Skip to content

Dependency composer auto loader guard to force use of EDOT delivered code (#64)#165

Merged
intuibase merged 2 commits into
elastic:mainfrom
intuibase:dependency_autoloader_guard
Feb 12, 2025
Merged

Dependency composer auto loader guard to force use of EDOT delivered code (#64)#165
intuibase merged 2 commits into
elastic:mainfrom
intuibase:dependency_autoloader_guard

Conversation

@intuibase

@intuibase intuibase commented Feb 11, 2025

Copy link
Copy Markdown
Contributor

Example output from phpstan run in otel contrib
With feature enabled:

[EDOT] [2025-02-11 15:39:05.075699 UTC] [242752/242752] [DEBUG   ] [DEPGUARD] Compilation of file '/home/paplo/sources/otel/opentelemetry-php-contrib/src/Instrumentation/MySqli/vendor/symfony/deprecation-contracts/function.php' will be discarded
[EDOT] [2025-02-11 15:39:05.078938 UTC] [242752/242752] [DEBUG   ] [DEPGUARD] Compilation of file '/home/paplo/sources/otel/opentelemetry-php-contrib/src/Instrumentation/MySqli/vendor/open-telemetry/api/Trace/functions.php' will be discarded
[EDOT] [2025-02-11 15:39:05.079243 UTC] [242752/242752] [DEBUG   ] [DEPGUARD] Compilation of file '/home/paplo/sources/otel/opentelemetry-php-contrib/src/Instrumentation/MySqli/vendor/ramsey/uuid/src/functions.php' will be discarded
[EDOT] [2025-02-11 15:39:05.079835 UTC] [242752/242752] [DEBUG   ] [DEPGUARD] Compilation of file '/home/paplo/sources/otel/opentelemetry-php-contrib/src/Instrumentation/MySqli/vendor/open-telemetry/sdk/Common/Util/functions.php' will be discarded
...
...
Note: Using configuration file /home/paplo/sources/otel/opentelemetry-php-contrib/src/Instrumentation/MySqli/phpstan.neon.dist.
 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


                                                                                                                        
 [OK] No errors                                                                                                         
                                                                                                                        

With feature disabled:

PHP Fatal error:  Cannot redeclare function OpenTelemetry\API\Trace\trace() (previously declared in /home/paplo/sources/elastic-otel-php/prod/php/vendor_84/open-telemetry/api/Trace/functions.php:23) in /home/paplo/sources/otel/opentelemetry-php-contrib/src/Instrumentation/MySqli/vendor/open-telemetry/api/Trace/functions.php on line 23

@intuibase intuibase self-assigned this Feb 11, 2025
@intuibase
intuibase marked this pull request as ready for review February 11, 2025 14:27
@intuibase
intuibase merged commit d092881 into elastic:main Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants