- Issue created by @pingwin4eg
The ServerCommand doesn't work when site is not installed yet. Even with the --suppress-login
flag.
$ php core/scripts/drupal server --suppress-login
Drupal development server started: <http://127.0.0.1:8888>
This server is not meant for production use.
Error: Class "Drupal\user\Entity\User" not found in core/lib/Drupal/Core/Command/ServerCommand.php on line 191 #0 core/lib/Drupal/Core/Command/ServerCommand.php(222): Drupal\Core\Command\ServerCommand->getOneTimeLoginUrl()
#1 core/lib/Drupal/Core/Command/ServerCommand.php(83): Drupal\Core\Command\ServerCommand->start()
#2 vendor/symfony/console/Command/Command.php(326): Drupal\Core\Command\ServerCommand->execute()
#3 vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run()
#4 vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#5 vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#6 core/scripts/drupal(28): Symfony\Component\Console\Application->run()
#7 {main}
Error: Class "Drupal\user\Entity\User" not found in Drupal\Core\Command\ServerCommand->getOneTimeLoginUrl() (line 191 of core/lib/Drupal/Core/Command/ServerCommand.php).
Assuming drupal site is not installed, run php core/scripts/drupal server
either with or without the --suppress-login
flag.
Check for the --suppress-login
flag, - if it's set, then do not create a one-time login URL.
Additionally, if the flag is not set, probably, the command could check whether a site is installed or not. And if not, also do not create a one-time login URL, but print a message about that.
Active
11.0 π₯