From 29b7f7f5c3ac94089cf176f3053a39af62bcef70 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 09:07:19 +0000 Subject: [PATCH] ref(tracing): Drop Transaction::$transaction redeclaration to remove Mago baseline entry --- analysis-baseline.toml | 6 ------ src/Tracing/Transaction.php | 7 +------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/analysis-baseline.toml b/analysis-baseline.toml index 2c8f8507a..ce925e035 100644 --- a/analysis-baseline.toml +++ b/analysis-baseline.toml @@ -1356,12 +1356,6 @@ code = "reference-to-undefined-variable" message = "Reference created from a previously undefined variable `$matches`." count = 1 -[[issues]] -file = "src/Tracing/Transaction.php" -code = "incompatible-property-type" -message = 'Property `Sentry\Tracing\Transaction::$transaction` has an incompatible type declaration from docblock.' -count = 1 - [[issues]] file = "src/Tracing/Transaction.php" code = "invalid-return-statement" diff --git a/src/Tracing/Transaction.php b/src/Tracing/Transaction.php index 4eb943d7e..3bd4c8689 100644 --- a/src/Tracing/Transaction.php +++ b/src/Tracing/Transaction.php @@ -31,11 +31,6 @@ final class Transaction extends Span */ private $name; - /** - * @var Transaction The transaction - */ - protected $transaction; - /** * @var TransactionMetadata */ @@ -103,7 +98,7 @@ public function getDynamicSamplingContext(): DynamicSamplingContext return $this->metadata->getDynamicSamplingContext(); } - $samplingContext = DynamicSamplingContext::fromTransaction($this->transaction, $this->hub); + $samplingContext = DynamicSamplingContext::fromTransaction($this, $this->hub); $this->getMetadata()->setDynamicSamplingContext($samplingContext); return $samplingContext;