diff --git a/README.md b/README.md index 132df45..8664f43 100755 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ #Funky Framadate API -Experimental REST backend in symfony 5 for Funky framadate frontend. +REST backend in symfony 5 for Funky framadate frontend. https://framagit.org/framasoft/framadate/funky-framadate-front -Follow this guide to setup. -* run `composer install` -configure env by creating local env file -`cp .env .env.local` and edit the file variables to give access to database. + ## TODO: * coordinate properties and paths to be more restful. @@ -14,7 +11,7 @@ return stack of votes when we want to get the configuration of one poll (see [do *** ### Requirements -You MUST have php version 8+ and [Composer](https://getcomposer.org/download/), and a database like Mysql, or postgresql, or mongodb, or any database that Doctrine can handle. +You MUST have [php version 8+ (see installation doc)](doc/php-8-install.md) and [Composer](https://getcomposer.org/download/), and a database like Mysql, or postgresql, or mongodb, or any database that Doctrine can handle. Setup access to database by creating a .env.local file, and fill the database user and password data. you can check that the database connection works with the command: ```bash @@ -22,11 +19,21 @@ php bin/console doctrine:schema:validate ``` ## Getting started +Follow this guide to setup. # Development install dependencies with Composer +configure env by creating local env file +``` +cp .env .env.local +``` +and edit the file variables to give access to database. +Launch dev server with the "symfony" cli tool: +``` +symfony serve +``` there are examples of request to make it all work in the [doc/examples.md](doc/examples.md). ### Check prerequisites @@ -50,7 +57,8 @@ configure env by creating local env file ## TODO: * coordinate properties and paths to be more restful. - + https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/ + return stack of votes when we want to get the configuration of one poll (see [doc/examples.md](doc/examples.md)) *** diff --git a/doc/php-8-install.md b/doc/php-8-install.md new file mode 100644 index 0000000..92427a1 --- /dev/null +++ b/doc/php-8-install.md @@ -0,0 +1,13 @@ +# Installer PHP-8 + +D'abord il vous faut vous débarasser des versions précédentes de php (si vous ne lancez pas ce projet à partir de docker). +```bash +sudo apt purge php-common +``` + +Pour Ubuntu / Debian, utilisez le ppa suivant. Mettez à jour Apt, puis installez php et hop, vous avez la version 8. +```bash +sudo add-apt-repository ppa:ondrej/php +sudo apt install php8.0 php8.0-fpm php8.0-mysql php8.0-bcrypt nginx + +``` diff --git a/symfony.lock b/symfony.lock index b5340bf..be784fa 100644 --- a/symfony.lock +++ b/symfony.lock @@ -159,6 +159,9 @@ "nikic/php-parser": { "version": "v4.10.4" }, + "php": { + "version": "8.0" + }, "phpstan/phpdoc-parser": { "version": "0.4.14" }, @@ -299,9 +302,6 @@ "symfony/options-resolver": { "version": "v5.2.4" }, - "symfony/orm-pack": { - "version": "v2.1.0" - }, "symfony/polyfill-intl-grapheme": { "version": "v1.22.1" },