Skip to content

Commit

Permalink
Make compatible with latest Phinx version.
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
fr3nch13 authored and Corey Taylor committed Nov 11, 2023
1 parent 7659d42 commit 6967ac2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 6967ac2

Please sign in to comment.