diff --git a/src/Maker/MakeEntity.php b/src/Maker/MakeEntity.php index 41f0287fb..f87233fb9 100644 --- a/src/Maker/MakeEntity.php +++ b/src/Maker/MakeEntity.php @@ -422,13 +422,13 @@ private function askForNextField(ConsoleStyle $io, array $fields, string $entity if ('string' === $type) { // default to 255, avoid the question - $classProperty->length = $io->ask('Field length', 255, Validator::validateLength(...)); + $classProperty->length = $io->ask('Field length', '255', Validator::validateLength(...)); } elseif ('decimal' === $type) { // 10 is the default value given in \Doctrine\DBAL\Schema\Column::$_precision - $classProperty->precision = $io->ask('Precision (total number of digits stored: 100.00 would be 5)', 10, Validator::validatePrecision(...)); + $classProperty->precision = $io->ask('Precision (total number of digits stored: 100.00 would be 5)', '10', Validator::validatePrecision(...)); // 0 is the default value given in \Doctrine\DBAL\Schema\Column::$_scale - $classProperty->scale = $io->ask('Scale (number of decimals to store: 100.00 would be 2)', 0, Validator::validateScale(...)); + $classProperty->scale = $io->ask('Scale (number of decimals to store: 100.00 would be 2)', '0', Validator::validateScale(...)); } if ($io->confirm('Can this field be null in the database (nullable)', false)) {