carthage-software
mago
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Optimizations
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(prelude): mark array_chunk chunks as non-empty Motivation: array_chunk() requires $length >= 1, so it never produces an empty chunk. The stub returned list<list<V>> / list<array<K, V>>, so returning the result as list<non-empty-list<V>> (or list<non-empty-array<K, V>> with $preserve_keys) was reported as an invalid return statement. This only affects the inferred type; no runtime behaviour changes. Approach: tighten the @return conditional in the array_chunk stub to list<non-empty-array<K, V>> / list<non-empty-list<V>>. An empty input still yields an empty outer list, which list<...> allows. Validation: added analyzer test arrays_array_chunk_non_empty. With the stub change reverted, `cargo test -p mago-analyzer array_chunk` fails with 2 invalid-return-statement issues; with the change it passes (6/6). `cargo test -p mago-analyzer -p mago-prelude` passes in full. I did not run the repo's lint/format CI targets. Report: https://github.com/carthage-software/mago/issues/2624 Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> Assisted-by: claude-sonnet-5-5 (via Claude Code)
pujitha24:auto/issue-2624
5 days ago
fix(analyzer): narrow iterable to array after !is_object() Motivation: `iterable` is `array|Traversable`, so after `!is_object($it)` the value must be an array. Mago kept it as `iterable<K, V>`, so returning it from a function declared to return an array reported a false `invalid-return-statement`. Approach: in `simple_negated_assertion_reconciler.rs`, when the negated assertion subtracts plain `object` and the assertion is not an equality, an `iterable` atomic is now replaced with a keyed array built from its key and value types. If the iterable's key type is not always an array key, it is replaced with `array-key`. Equality assertions and other subtracted types leave `iterable` unchanged. Validation: added `iterable_not_object_is_array` to `iterable_type_reconciliation.php`. It returns an `iterable<int, string>` as `array<int, string>` after an `!is_object()` check. Fixes #2620 Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> Assisted-by: claude-sonnet-5-5 (via Claude Code)
pujitha24:auto/issue-2620
5 days ago
release: 1.59.0 Signed-off-by: azjezz <azjezz@protonmail.com>
main
5 days ago
fix(analyzer): type empty-capable parse_url components as string (#2610) Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> Signed-off-by: Seifeddine Gmati <29315886+azjezz@users.noreply.github.com> Co-authored-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> Co-authored-by: Seifeddine Gmati <29315886+azjezz@users.noreply.github.com>
main
5 days ago
fix(analyzer): skip diagnostics for inferred nullsafe checks closes #2591 closes #2598 Signed-off-by: azjezz <azjezz@protonmail.com>
main
5 days ago
fix(analyzer): don't report derived nullsafe clauses as explicit checks `$x = $value?->prop === $expr;` reported a false `impossible-null-type-comparison` on `$value->prop`, while the same comparison inside `if` or `return` was clean. The formula for a nullsafe comparison adds `!null` clauses for the receiver chain. They were built as non-generated, so the assignment logic check treated them like a user-written `$value->prop !== null`. Mark them as generated, like the nullsafe null-equality clause already is. Fixes #2591
serdarucel:fix/analyzer-nullsafe-comparison-assignment
5 days ago
fix(analyzer): preserve reachable types after elseif chains closes #2619 Signed-off-by: azjezz <azjezz@protonmail.com>
main
5 days ago
fix(analyzer): narrow union types after strict equality (#2559) Signed-off-by: Alfred Bez <1001186+alfredbez@users.noreply.github.com> Co-authored-by: Alfred Bez <1001186+alfredbez@users.noreply.github.com>
main
6 days ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(prelude): mark array_chunk chunks as non-empty
#2628
5 days ago
2ef9149
pujitha24:auto/issue-2624
CodSpeed Performance Gauge
0%
fix(analyzer): narrow iterable to array after !is_object()
#2627
5 days ago
c3877e6
pujitha24:auto/issue-2620
CodSpeed Performance Gauge
+12%
fix(analyzer): don't report derived nullsafe clauses as explicit checks
#2598
8 days ago
c60a31d
serdarucel:fix/analyzer-nullsafe-comparison-assignment
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs