Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make:entity requires Mercure too soon #1481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
smnandre opened this issue Mar 15, 2024 · 1 comment
Closed

Make:entity requires Mercure too soon #1481

smnandre opened this issue Mar 15, 2024 · 1 comment

Comments

@smnandre
Copy link
Member

The recent #1445 introduced a bug (as raised here)

This check should be done only if the user answer "YES" to the question.

  if (
      !$input->getOption('broadcast')
      && class_exists(Broadcast::class)
      && !class_exists($this->generator->createClassNameDetails($entityClassName, 'Entity\\')->getFullName())
  ) {
      // Mercure is needed
      if (!class_exists(MercureExtension::class)) {
          throw new RuntimeCommandException('Please run "composer require symfony/mercure". It is needed to broadcast entities.');
      }

      $description = $command->getDefinition()->getOption('broadcast')->getDescription();
      $question = new ConfirmationQuestion($description, false);
      $isBroadcast = $io->askQuestion($question);
      $input->setOption('broadcast', $isBroadcast);
  }
@smnandre
Copy link
Member Author

Fixed there, sorry 😮‍💨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant