Skip to content

Symfony 7: Setup

One time initial setup

Install Symfony binary: https://symfony.com/download

Linux (dnf):

curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.rpm.sh' | sudo -E bash
sudo dnf install symfony-cli

vim ~/.bashrc

alias sy='symfony';
alias syc='symfony console';

source ~/.bashrc

Create project

# Minimal (microservice, console app, API)
symfony new PROJECT_NAME
# Web app (extra packages)
symfony new PROJECT_NAME --webapp
# Demo app (complete app showcasing recomended way)
symfony new PROJECT_NAME --demo

cd PROJECT_NAME

# Install dependencies
composer update

# Run periodically
symfony check:security

Customization

  • gitignore
  • php 8.3
  • WSC coding standards
  • DDEV

PhpStorm plugin

PHPStorm: Settings > Symfony > Enable plugin for project.