06 Nov 2024 ~ 1 min read

Create Web-API with Symfony part 1


Create Web-API with Symfony

Check requirements for Symfony

  • install symfony cli
  • install php with xdebug
brew install symfony-cli/tap/symfony-cli
brew install php
arch -arm64 sudo pecl install xdebug
symfony check:requirements

https://symfony.com/download https://symfony.com/doc/current/setup.html https://docs.devsense.com/en/vscode/debug/xdebug-mac

Start a new project

create a new project with symfony cli

symfony local:new --api symfony-web-api-project
cd symfony-web-api-project

create a .env.local file

cp .env .env.local

configure database in .env.local

install maker bundle

symfony composer require symfony/maker-bundle --dev

make entities

symfony console make:entity

make command for import data

symfony console make:command

Headshot of Jurij Schlaht

Hi, I'm Jurij. I'm a web developer, macOS system administrator, photographer and soon also data engineer based in Frankfurt. You can follow me on Instagram, see some of my work on GitHub, or read more about me here on this page.