Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 16 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,48 @@ Symfony Demo Application
The "Symfony Demo Application" is a reference application created to show how
to develop Symfony applications following the recommended best practices.

[![Build Status](https://travis-ci.org/symfony/symfony-demo.svg?branch=master)](https://travis-ci.org/symfony/symfony-demo)

Requirements
------------

* PHP 7.1.3 or higher;
* PDO-SQLite PHP extension enabled;
* and the [usual Symfony application requirements](https://symfony.com/doc/current/reference/requirements.html).

If unsure about meeting these requirements, download the demo application and
browse the `http://localhost:8000/config.php` script to get more detailed
information.
* and the [usual Symfony application requirements][1].

Installation
------------

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

First, install the [Symfony Installer](https://github.com/symfony/symfony-installer)
if you haven't already. Then, install the Symfony Demo Application executing
this command anywhere in your system:
Execute this command to install the project:

```bash
$ symfony demo

# if you're using Windows:
$ php symfony demo
$ composer create-project symfony/symfony-demo
```

If the `demo` command is not available, update your Symfony Installer to the
most recent version executing the `symfony self-update` command.

> **NOTE**
>
> If you can't use the Symfony Installer, download and install the demo
> application using Git and Composer:
>
> $ git clone https://github.com/symfony/symfony-demo symfony_demo
> $ cd symfony_demo/
> $ composer install --no-interaction
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

Usage
-----

There is no need to configure a virtual host in your web server to access the application.
Just use the built-in web server:
There's no need to configure anything to run the application. Just execute this
command to run the built-in web server and access the application in your
browser at <http://localhost:8000>:

```bash
$ cd symfony_demo/
$ cd symfony-demo/
$ php bin/console server:run
```

This command will start a web server for the Symfony application. Now you can
access the application in your browser at <http://localhost:8000>. You can
stop the built-in web server by pressing `Ctrl + C` while you're in the
terminal.

> **NOTE**
>
> If you want to use a fully-featured web server (like Nginx or Apache) to run
> Symfony Demo application, configure it to point at the `web/` directory of the project.
> For more details, see:
> https://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this note be removed entirely ? I think it might make sense to keep it. People using the symfony-demo to benchmark Symfony should hopefully do it with Apache/Nginx and PHP-FPM rather than using the single-threaded builtin webserver.

Alternatively, you can [configure a fully-featured web server][2] like Nginx
or Apache to run the application.

Testing
-------
Tests
-----

Execute this command to run tests:

```bash
$ cd symfony_demo/
$ cd symfony-demo/
Copy link
Contributor

@bocharsky-bw bocharsky-bw Oct 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was on purpose because Symfony installer creates symfony_demo folder instead, i.e. when $ symfony demo. Do we completely drop Symfony installer support?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! But now with "composer create symfony/symfony-demo" it generates "symfony-demo/" so I think we must update this.

Copy link
Contributor

@bocharsky-bw bocharsky-bw Oct 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove Symfony installer from this README then 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ ./vendor/bin/simple-phpunit
```

[1]: https://symfony.com/doc/current/reference/requirements.html
[2]: https://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html