Description
Hello,
I am using a non-standard folder structure and I just discovered a "problem" with server:run
and server:start
(for me it's a DX) :
$documentRoot = $input->getOption('docroot');
if (null === $documentRoot) {
$documentRoot = $this->getContainer()->getParameter('kernel.root_dir').'/../web';
}
For my distribution, the $documentRoot
should be : $this->getContainer()->getParameter('kernel.root_dir').'/../../web'
I don't want to tell to each dev wich using my distribution to add the --docroot option (or using an alias via composer scripts/make) so I'm looking to the best way to change this.
Solutions :
1- ServerRunCommand and ServerStartCommand should be used as services to allow overriding
2- Add a getDocumentRoot option in Kernel and use the parameter instead of relative path (simpler)
3- Create a symfony/server-bundle with all related server commands as dependency of framework-bundle
What's your opinion?