From 2d9ca3176cb6ee396a9b6e2f894262d6c92069bd Mon Sep 17 00:00:00 2001 From: Pascal CESCON - Amoifr Date: Sun, 28 Jun 2026 12:05:15 +0200 Subject: [PATCH] [MakeEntity] Remove dead is_string() branch in generate() The values stored in $fileManagerOperations always are ClassSourceManipulator instances (created via createClassManipulator()), so the is_string() branch was never reached. It was a leftover from older versions that displayed a message. Drop the dead branch (and its phpstan-ignore) and dump the files directly. --- src/Maker/MakeEntity.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Maker/MakeEntity.php b/src/Maker/MakeEntity.php index 76d18322c..b616b9adb 100644 --- a/src/Maker/MakeEntity.php +++ b/src/Maker/MakeEntity.php @@ -305,12 +305,8 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen throw new \Exception('Invalid value.'); } - foreach ($fileManagerOperations as $path => $manipulatorOrMessage) { - if (\is_string($manipulatorOrMessage)) { /* @phpstan-ignore-line - https://github.com/symfony/maker-bundle/issues/1509 */ - $io->comment($manipulatorOrMessage); - } else { - $this->fileManager->dumpFile($path, $manipulatorOrMessage->getSourceCode()); - } + foreach ($fileManagerOperations as $path => $manipulator) { + $this->fileManager->dumpFile($path, $manipulator->getSourceCode()); } }