1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00

add documentation for php-8.0

This commit is contained in:
tykayn 2021-04-22 12:35:57 +02:00 committed by Baptiste Lemoine
parent 924f114129
commit a24d38ca4e
3 changed files with 31 additions and 10 deletions

View File

@ -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,6 +57,7 @@ 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))

13
doc/php-8-install.md Normal file
View File

@ -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
```

View File

@ -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"
},