Skip to content

mvchn/guild

Repository files navigation

Testing Symfony

Guild Application

Requirements

Installation

You can use Git clone:

$ git clone https://github.com/mvchn/guild.git my_project
$ cd my_project/
$ composer install 

Prepare database

For SQLite:

$ mkdir data
$ cd data
$ sqlite3 database.sqlite

Create schema

$ symfony console  doctrine:database:create
$ symfony console  doctrine:schema:create

For PostgreSQL:

Change ENV variable to your DSN:

DATABASE_URL="postgresql://main:main@127.0.0.1:5432/main?serverVersion=13&charset=utf8"

Create schema

$ symfony console  doctrine:schema:create

Add user

$ symfony console app:add-user

Usage

There's no need to configure anything to run the application. If you have installed Symfony binary, run this command:

$ cd my_project/
$ symfony serve

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

If you don't have the Symfony binary installed, run php -S localhost:8000 -t public/ to use the built-in PHP web server or configure a web server like Nginx or Apache to run the application.

Tests

Execute this command to run tests:

$ cd my_project/
$ ./bin/phpunit