diff --git a/src/Rector/v12/v0/tca/MigrateNullFlagRector.php b/src/Rector/v12/v0/tca/MigrateNullFlagRector.php index 5da706238..1da5ad4b0 100644 --- a/src/Rector/v12/v0/tca/MigrateNullFlagRector.php +++ b/src/Rector/v12/v0/tca/MigrateNullFlagRector.php @@ -68,7 +68,7 @@ protected function refactorColumn(Expr $columnName, Expr $columnTca): void /** @var String_ $evalStringNode */ $evalStringNode = $evalArrayItem->value; - $value = $evalStringNode->value; + $value = (string) $evalStringNode->value; if (! StringUtility::inList($value, 'null')) { return; diff --git a/tests/Rector/v12/v0/tca/MigrateNullFlagRector/Fixture/fixture.php.inc b/tests/Rector/v12/v0/tca/MigrateNullFlagRector/Fixture/fixture.php.inc index 8be1dbba9..f29b97149 100644 --- a/tests/Rector/v12/v0/tca/MigrateNullFlagRector/Fixture/fixture.php.inc +++ b/tests/Rector/v12/v0/tca/MigrateNullFlagRector/Fixture/fixture.php.inc @@ -21,6 +21,11 @@ return [ 'nullable' => true, ], ], + 'employment_type' => [ + 'config' => [ + 'eval' => '' + ], + ], ], ]; @@ -46,6 +51,11 @@ return [ 'already_nullable_column' => [ 'config' => ['nullable' => true], ], + 'employment_type' => [ + 'config' => [ + 'eval' => '' + ], + ], ], ];