這個錯誤的原因來自於沒有安裝一個依賴庫:
官方文檔說明如下:
Modifying Columns
Prerequisites
Before modifying a column, be sure to add the
doctrine/dbal
dependency to yourcomposer.json
file. The Doctrine DBAL library is used to determine the current state of the column and create the SQL queries needed to make the specified adjustments to the column:composer require doctrine/dbal
使用上面提到的命令安裝指定依賴就行了。
這個錯誤是我使用renamecolume修改列的名字的時候發現的。