diff --git a/generator/src/GenerateCommand.php b/generator/src/GenerateCommand.php index 572e5bd4..6c21416b 100644 --- a/generator/src/GenerateCommand.php +++ b/generator/src/GenerateCommand.php @@ -53,26 +53,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->runCsFix($output); - // Let's require the generated file to check there is no error. - $files = \glob(__DIR__.'/../../generated/*.php'); - if ($files === false) { - throw new \RuntimeException('Failed to require the generated file'); - } - - foreach ($files as $file) { - require($file); - } - - $files = \glob(__DIR__.'/../../generated/Exceptions/*.php'); - if ($files === false) { - throw new \RuntimeException('Failed to require the generated exception file'); - } - - require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php'; - foreach ($files as $file) { - require($file); - } - // Finally, let's edit the composer.json file $output->writeln('Editing composer.json'); ComposerJsonEditor::editComposerFileForGeneration(\array_values($modules)); diff --git a/tests/GeneratedFilesTest.php b/tests/GeneratedFilesTest.php new file mode 100644 index 00000000..8c4c9499 --- /dev/null +++ b/tests/GeneratedFilesTest.php @@ -0,0 +1,42 @@ +