frankenphp
frankenphp copied to clipboard
Make root flag in php-server command required
You can right now start with php-server a PHP Server without passing a root folder. So it's just showing 404 pages. That flag should be required so for DX.
Also passing arguments when no expected does not throw an error. Before I read the help page, I just run frankenphp php-server ~/foo and expected it serves ~/foo as Docroot as there were no error 😓
When you do that, it serves the content of the current directory, which is the same behavior as php -S.
If you have an index.php file in the current directory (e.g: WordPress), it will be served as the default page.
OHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHhh
Maybe a log entry what the current document root is? 😂
The problem is that the document root can change for each request.