From 6967ac2dc17efc4658aaee35e96c94a618d4d453 Mon Sep 17 00:00:00 2001 From: Brian French Date: Thu, 9 Nov 2023 14:31:56 -0800 Subject: [PATCH] Make compatible with latest Phinx version. A composer update, updated phinx which caused an error in unit testing: ``` HP Fatal error: Declaration of Migrations\Table::addColumn(Phinx\Db\Table\Column|string $columnName, Phinx\Util\Literal|string|null $type, $options = []) must be compatible with Phinx\Db\Table::addColumn(Phinx\Db\Table\Column|string $columnName, Phinx\Util\Literal|string|null $type = null, array $options = []) in vendor/cakephp/migrations/src/Table.php on line 65 ``` --- composer.json | 2 +- src/Table.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2c7c9478..dd752d32 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "require": { "php": ">=8.1", - "robmorgan/phinx": "^0.15.2", + "robmorgan/phinx": "^0.15.3", "cakephp/orm": "^5.0", "cakephp/cache": "^5.0" }, diff --git a/src/Table.php b/src/Table.php index 15238b5c..bfb504b9 100644 --- a/src/Table.php +++ b/src/Table.php @@ -62,7 +62,7 @@ public function addPrimaryKey(string|array $columns) * @throws \InvalidArgumentException * @return $this */ - public function addColumn(Column|string $columnName, string|Literal|null $type, $options = []) + public function addColumn(Column|string $columnName, string|Literal|null $type = null, $options = []) { $options = $this->convertedAutoIncrement($options);