Skip to content

symfony/demo

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

41d6cfd · Oct 20, 2023
Nov 13, 2022
Dec 19, 2022
May 31, 2023
Dec 2, 2021
Mar 30, 2023
Feb 14, 2023
Jun 5, 2020
May 9, 2023
Oct 20, 2023
Jul 18, 2023
Apr 4, 2023
Jan 13, 2023
Nov 1, 2018
Dec 8, 2015
Mar 30, 2023
Jun 1, 2021
Feb 13, 2023
Oct 4, 2022
Apr 27, 2017
Feb 2, 2023
Mar 8, 2023
Oct 17, 2023
May 31, 2023
Apr 5, 2023
Jan 13, 2023
Jan 13, 2023
Dec 2, 2021
May 31, 2023
Feb 13, 2023
Oct 19, 2023

Repository files navigation

Symfony Demo Application

The "Symfony Demo Application" is a reference application created to show how to develop applications following the Symfony Best Practices.

You can also learn about these practices in the official Symfony Book.

Requirements

Installation

There are 3 different ways of installing this project depending on your needs:

Option 1. Download Symfony CLI and use the symfony binary installed on your computer to run this command:

$ symfony new --demo my_project

Option 2. Download Composer and use the composer binary installed on your computer to run these commands:

# you can create a new project based on the Symfony Demo project...
$ composer create-project symfony/symfony-demo my_project

# ...or you can clone the code repository and install its dependencies
$ git clone https://github.com/symfony/demo.git my_project
$ cd my_project/
$ composer install

Option 3. Click the following button to deploy this project on Platform.sh, the official Symfony PaaS, so you can try it without installing anything locally:

Deploy on Platform.sh

Usage

There's no need to configure anything before running the application. There are 2 different ways of running this application depending on your needs:

Option 1. Download Symfony CLI and run this command:

$ cd my_project/
$ symfony serve

Then access the application in your browser at the given URL (https://localhost:8000 by default).

Option 2. Use a web server like Nginx or Apache to run the application (read the documentation about configuring a web server for Symfony).

On your local machine, you can run this command to use the built-in PHP web server:

$ cd my_project/
$ php -S localhost:8000 -t public/

Tests

Execute this command to run tests:

$ cd my_project/
$ ./bin/phpunit