Symfony Server
Symfony Server is a local web server that you can use to develop Symfony applications. It is a replacement for the PHP built-in web server and provides a more complete development environment.
Enabling HTTPS Support
To enable HTTPS support, run the following command:
symfony server:ca:install
Starting the Symfony Server
To start the Symfony server, run the following command:
symfony server:start
To start the Symfony server on a specific port, run the following command:
symfony server:start --port=8000
To start the Symfony server on a deamon mode, run the following command:
symfony serve -d
Stopping the Symfony Server
To stop the Symfony server, run the following command:
symfony server:stop
Checking the Symfony Server Status
To check the Symfony server status, run the following command:
symfony server:status
Checking the Symfony Server Logs
To check the Symfony server logs, run the following command:
symfony server:log
Launching the Symfony Server in a specific PHP version
To launch the Symfony server in a specific PHP version, run the following command in the project directory:
echo 7.4 > .php-version
If you want check the PHP version, run the following command:
symfony local:php:list
Opening the Symfony Server in the Browser
To open the Symfony server in the browser, run the following command:
symfony open:local
Clearing the Symfony Cache
To clear the Symfony cache, run the following command:
symfony console cache:clear