Skip to content

chore(deps): Bump mago to 1.60.2 - #2394

Merged
Litarnus merged 1 commit into
masterfrom
chore/upgrade-mago-1.60.2
Nov 18, 2026
Merged

Litarnus merged 1 commit into
masterfrom
chore/upgrade-mago-1.60.2

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Bumps the pinned Mago version from 1.30.0 to 1.60.2.

1.60 rewords many messages, so a lot of loose baseline entries stopped matching. This PR fixes the simple new findings and regenerates the baseline for the rest. The baseline goes from 315 to 256 entries.

Fixed

  • Attachment::getSize() / getData() docblocks said int / string while the native return types are nullable. Mago trusted the docblock and flagged the null returns in FileAttachment and the null checks in AttachmentItem and ClientReportAggregator. The docblocks now say int|null / string|null.
  • Removed four @mago-ignore analysis:deprecated-method pragmas in HttpCookieCollector that Mago now reports as unused.
  • Simplified !isset($x) || (isset($x) && empty($x)) to empty($x) in Dsn::createFromString(). It behaves the same.
  • Mago now loads stubs/ (with the .stub extension). These are the Excimer stubs PHPStan already uses, so the analyzer can resolve ExcimerProfiler & co. That removes about 80 unknown-ref(Excimer*) / mixed findings in the profiling code.

Added to the baseline for future work

  • Monolog: deprecated Logger::* constants and unreachable-else-clause in the compatibility traits. These are needed while Monolog 1/2/3 are all supported.
  • IntegrationRegistry::getIntegrationsToSetup(): Mago infers the callback result type as always valid, so it flags the runtime is_array guard for user callbacks.
  • DataCollectionOptions http_bodies validator (array_diff on unvalidated user input). Tightening it would change option validation behavior.
  • MetricsAggregator::add(): attributes become mixed because of the by-reference closure capture.
  • FrameBuilder: isVariadic() is reported as always false. This looks like a Mago false positive.
  • FileAttachment: the intentional ValueError catch (avoid-catching-error).
  • mixed-assignment warnings in Client and OptionsResolver. Master already reports these outside the baseline.
  • Existing entries, re-added with the new 1.60 wording.

No runtime behavior changes.

via Martin Linzmayer.

--

View Session [Sentry]

Fix the simple new findings, load the Excimer stubs that PHPStan already
uses, and regenerate the baseline for the remaining findings.

Co-Authored-By: Martin Linzmayer <martin.linzmayer@sentry.io>
@Litarnus
Litarnus marked this pull request as ready for review November 18, 2026 10:14
@Litarnus
Litarnus requested review from a team and stayallive as code owners November 18, 2026 10:14

@stayallive stayallive left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@Litarnus
Litarnus merged commit e8f6c66 into master Nov 18, 2026
59 checks passed
@Litarnus
Litarnus deleted the chore/upgrade-mago-1.60.2 branch November 18, 2026 11:02
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