Skip to content

Commit

Permalink
Address deprecation of Table::changeColumn() (#10121)
Browse files Browse the repository at this point in the history
It is deprecated in favor of Table::modifyColumn().
  • Loading branch information
greg0ire authored Oct 11, 2022
1 parent 7ce9a6f commit 1a9f40c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Doctrine/ORM/Tools/SchemaTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,9 @@ private function gatherColumn(
}

if ($table->hasColumn($columnName)) {
$method = method_exists($table, 'modifyColumn') ? 'modifyColumn' : 'changeColumn';
// required in some inheritance scenarios
$table->changeColumn($columnName, $options);
$table->$method($columnName, $options);
} else {
$table->addColumn($columnName, $columnType, $options);
}
Expand Down

0 comments on commit 1a9f40c

Please sign in to comment.