Closed pamparam83 closed 1 year ago
There already PR was rejected https://github.com/yiisoft/yii-console/pull/139
You can specify 0
as port already and it will choose a free port.
Yes, if you specify 0, then something like this will appear in the console
Server started on http://127.0.0.1:0/ Document root is "/home..." Routing file is "public/index.php" Quit the server with CTRL-C or COMMAND-C. [74064] [Fri Apr 14 13:40:56 2023] PHP 8.2.4 Development Server (http://127.0.0.1:4525) started [74063] [Fri Apr 14 13:40:56 2023] PHP 8.2.4 Development Server (http://127.0.0.1:4525) started
which is not entirely clear Server started on http://127.0.0.1:0/ - not work my suggestion eliminates this problem
add supports dynamic port selection. in command ./yii serve