Repository navigation
chore(deps): Bump mago to 1.60.2 - #2394
Merged
Merged
Conversation
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
marked this pull request as ready for review
November 18, 2026 10:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 saidint/stringwhile the native return types are nullable. Mago trusted the docblock and flagged thenullreturns inFileAttachmentand the null checks inAttachmentItemandClientReportAggregator. The docblocks now sayint|null/string|null.@mago-ignore analysis:deprecated-methodpragmas inHttpCookieCollectorthat Mago now reports as unused.!isset($x) || (isset($x) && empty($x))toempty($x)inDsn::createFromString(). It behaves the same.stubs/(with the.stubextension). These are the Excimer stubs PHPStan already uses, so the analyzer can resolveExcimerProfiler& co. That removes about 80unknown-ref(Excimer*)/ mixed findings in the profiling code.Added to the baseline for future work
Logger::*constants andunreachable-else-clausein 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 runtimeis_arrayguard for user callbacks.DataCollectionOptionshttp_bodiesvalidator (array_diffon unvalidated user input). Tightening it would change option validation behavior.MetricsAggregator::add(): attributes becomemixedbecause of the by-reference closure capture.FrameBuilder:isVariadic()is reported as always false. This looks like a Mago false positive.FileAttachment: the intentionalValueErrorcatch (avoid-catching-error).mixed-assignmentwarnings inClientandOptionsResolver. Master already reports these outside the baseline.No runtime behavior changes.
via Martin Linzmayer.
--
View Session [Sentry]