You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Analysis] Connection.php: $resource nullable typing cascades due to mago flow-analysis limitation #68
mago analyze flags incompatible-property-type, invalid-property-assignment-value, and 2x redundant-condition around $resource (declared /** @var mysqli */ protected $resource;, non-nullable per docblock, but disconnect() genuinely sets it to null). Making the property honestly nullable (native ?mysqli or docblock-only mysqli|null) was tried and reverted: it cascades into ~6 new possible-method-access-on-null findings across every other method (beginTransaction(), commit(), rollback(), getLastGeneratedValue(), etc.), because mago does not retain null-narrowing of a class property across separate statements/methods, matching the same limitation already documented for Statement.php in #61.
These findings will be captured in a mago baseline rather than fixed or suppressed inline.
Closing as resolved. The \ nullable-typing findings are captured in the committed analysis-baseline.toml for src/Connection.php — incompatible-property-type, invalid-property-assignment-value and redundant-condition.
Activity
mago analyze: suppress createResult() argument mismatch in Connection…
tyrsson commentedon Oct 7, 2026
Closing as resolved. The
\nullable-typing findings are captured in the committedanalysis-baseline.tomlforsrc/Connection.php—incompatible-property-type,invalid-property-assignment-valueandredundant-condition.