Download Symfony
Step 1. Install Symfony CLI
The Symfony CLI is a developer tool to help you build, run, and manage your Symfony applications directly from your terminal. It's Open-Source, works on macOS, Windows, and Linux, and you only have to install it once in your system.
You can use the Symfony CLI to:
- Create new Symfony applications
- Develop applications with a local web server with TLS support
- Check for security vulnerabilities
- Get seamless integration with Platform.sh
Choose one of the following installation methods:
Debian/Ubuntu — APT based Linux
$ echo 'deb [trusted=yes] https://repo.symfony.com/apt/ /' | sudo tee /etc/apt/sources.list.d/symfony-cli.list
$ sudo apt update
$ sudo apt install symfony-cli
Fedora/CentOS — YUM based Linux
Use yum
instead of dnf
on older versions.
$ echo '[symfony-cli]
name=Symfony CLI
baseurl=https://repo.symfony.com/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/symfony-cli.repo
$ sudo dnf install symfony-cli
APK
based Linux
Download the binary from GitHub: aarch64, x86, x86_64.
Binaries
Step 2. Create New Symfony Applications
Use the symfony
binary provided by the Symfony CLI to create new applications:
If you are building a traditional web application:
$ symfony new --webapp my_project
If you are building a microservice, console application or API:
$ symfony new my_project
You can also read Symfony Docs to learn about installing Symfony with Composer.
Install Symfony Components
You can also enjoy Symfony features without creating new applications. Symfony Components, a set of decoupled and reusable libraries, work on any existing PHP application.
Install Composer and run this command to add a Symfony component in your app:
$ composer require