3.17.0
Fixed
SlowMigrationDdlRule missed migrations that pass their definition through a helper. A migration that guards each statement so a run killed by the deploy hook can resume tends to factor the guard into a private method, which leaves Schema::table() holding a parameter rather than a literal closure:
$this->addIndex(self::LEARNER_ID_INDEX, fn (Blueprint $table) => $table->index('external_learner_id', self::LEARNER_ID_INDEX));
private function addIndex(string $index, Closure $definition): void
{
if (Schema::hasIndex($this->table, $index)) {
return;
}
Schema::table($this->table, $definition);
}3.16.0 walked literal closures only, so it reported nothing here — including index builds on an outlier table, the shape the rule exists to catch. The parameter is now traced back to the helper's own call sites, matching named arguments by name and positional ones by position, so two helpers altering two tables stay apart.
Added
hihaho.database.uncheckableSchemaChange. A Schema::table() on an outlier whose definition still cannot be read — built elsewhere, or handed in from outside the class — is reported rather than passed over, on the same reasoning as hihaho.database.unresolvableAlterTarget. A rule that cannot check something must not look like a rule that checked it and found nothing.
Notes
Backward compatible; outlierTables is still empty by default. Projects already on 3.16.0 should expect more findings on migrations that use helper methods — those operations were previously invisible, not absent.
Full Changelog: v3.16.0...v3.17.0