From 1a9f40c78528f66cb82d782ca9d0e9211dc852c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 11 Oct 2022 19:38:01 +0200 Subject: [PATCH] Address deprecation of Table::changeColumn() (#10121) It is deprecated in favor of Table::modifyColumn(). --- lib/Doctrine/ORM/Tools/SchemaTool.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index d011e8ecc18..aa02054ae4d 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -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); }