Getting Started with Symfony 5.x
The leading PHP framework to create websites and web applications. Built on top of the Symfony Components
Technical Requirements
- Install PHP 7.2.5 or higher and these PHP extensions (which are installed and enabled by default in most PHP 7 installations).
- Install Composer, which is used to install PHP packages.
- Installing Symfony CLI
Installing Symfony CLI
For linux, you can use the following commain to install symfony CLI:
Then you can run the following command to run symfony
command directly.
Now you can run the symfony
command to verify:
Check system requirements
You can run the following command to check the system requirements:
symfony check:requirements
Verify Composer
To start with symfony we need to install the composer first. You can use the above mentioned link to install composer. In present example, we are using Linux Ubuntu 20.04
Create symfony project
To create a symfony 5 project, you need to run the following command which will not include the extra dependency.
composer create-project symfony/skeleton symfony
After the command you need to move inside the folder:
cd symfony/
To run the symfony project, you can install the following command
symfony serve
References