From cb62739613ed84b511b692d2aee979b0e1b5d6d0 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 21 Dec 2022 13:24:09 +0100 Subject: [PATCH 1/5] up symfony flex with php 8.0 --- composer.json | 5 ++++- composer.lock | 25 +++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index ba92c49..63a18ed 100755 --- a/composer.json +++ b/composer.json @@ -14,7 +14,10 @@ "preferred-install": { "*": "dist" }, - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "symfony/flex": true + } }, "conflict": { "symfony/symfony": "*" diff --git a/composer.lock b/composer.lock index 0850ee9..b95aa4e 100755 --- a/composer.lock +++ b/composer.lock @@ -4114,16 +4114,16 @@ }, { "name": "symfony/flex", - "version": "v1.13.3", + "version": "v1.19.4", "source": { "type": "git", "url": "https://github.com/symfony/flex.git", - "reference": "2597d0dda8042c43eed44a9cd07236b897e427d7" + "reference": "c82477240111bfe41a1067c9f0ab91d40bafa5b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/flex/zipball/2597d0dda8042c43eed44a9cd07236b897e427d7", - "reference": "2597d0dda8042c43eed44a9cd07236b897e427d7", + "url": "https://api.github.com/repos/symfony/flex/zipball/c82477240111bfe41a1067c9f0ab91d40bafa5b6", + "reference": "c82477240111bfe41a1067c9f0ab91d40bafa5b6", "shasum": "" }, "require": { @@ -4132,16 +4132,13 @@ }, "require-dev": { "composer/composer": "^1.0.2|^2.0", - "symfony/dotenv": "^4.4|^5.0", - "symfony/filesystem": "^4.4|^5.0", - "symfony/phpunit-bridge": "^4.4|^5.0", - "symfony/process": "^3.4|^4.4|^5.0" + "symfony/dotenv": "^4.4|^5.0|^6.0", + "symfony/filesystem": "^4.4|^5.0|^6.0", + "symfony/phpunit-bridge": "^4.4.12|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0" }, "type": "composer-plugin", "extra": { - "branch-alias": { - "dev-main": "1.13-dev" - }, "class": "Symfony\\Flex\\Flex" }, "autoload": { @@ -4162,7 +4159,7 @@ "description": "Composer plugin for Symfony", "support": { "issues": "https://github.com/symfony/flex/issues", - "source": "https://github.com/symfony/flex/tree/v1.13.3" + "source": "https://github.com/symfony/flex/tree/v1.19.4" }, "funding": [ { @@ -4178,7 +4175,7 @@ "type": "tidelift" } ], - "time": "2021-05-19T07:19:15+00:00" + "time": "2022-12-20T07:19:24+00:00" }, { "name": "symfony/form", @@ -7614,5 +7611,5 @@ "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.2.0" } From e3b4d6e1968a2f17848d7f7a49d7d67d169e789c Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 21 Dec 2022 18:17:22 +0100 Subject: [PATCH 2/5] add frontend instructions --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 742b8a1..daf37fb 100755 --- a/README.md +++ b/README.md @@ -172,7 +172,11 @@ set a virtual host on your server, configure CORS access to have the API to work configure database access in a .env.local file , replace variables DATABASE_URL=mysql://database_user:db_user_password@127.0.0.1:3306/database_name this file is not versionned and should stay like this. - +## Setup the default funky frontend +Use the scripts to get the framadate funky frontend and update it +```bash +bash front_update.sh +``` ## cronjob to delete expired polls you can open your crontabl in command line with : ``` From ee77d61284870177e6995f4265d8faa5c12963bc Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 21 Dec 2022 18:19:18 +0100 Subject: [PATCH 3/5] ignore frontend folder --- .gitignore | 5 +++-- funky-framadate-front | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 160000 funky-framadate-front diff --git a/.gitignore b/.gitignore index e82b3dc..9298a6f 100755 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ public/main-es5.js public/polyfills-es2018.js public/polyfills-es5.js public/scripts.js -public/styles.css +public/styles.cssup public/* ###> symfony/phpunit-bridge ### @@ -41,4 +41,5 @@ public/* node_modules funky-framadate-front/* -funky-framadate-front \ No newline at end of file +funky-framadate-front +/funky-framadate-front/ diff --git a/funky-framadate-front b/funky-framadate-front new file mode 160000 index 0000000..2820baa --- /dev/null +++ b/funky-framadate-front @@ -0,0 +1 @@ +Subproject commit 2820baa227c48d780a0eca99acc5f660adbe03ea From a83cfb3edfe4aeb32956664c5549ab8f16674d3f Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 21 Dec 2022 18:33:33 +0100 Subject: [PATCH 4/5] add instructions for production frontend funky Signed-off-by: tykayn <15d65f2f-0b14-4f70-bf34-e130180ed62b@users.tedomum.net> --- README.md | 2 ++ front_update.sh | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index daf37fb..2bab0ed 100755 --- a/README.md +++ b/README.md @@ -177,6 +177,8 @@ Use the scripts to get the framadate funky frontend and update it ```bash bash front_update.sh ``` +If you wish to develop things for the frontend, do not rebuild it each time, use a live server in the funky-framadate-front folder. + ## cronjob to delete expired polls you can open your crontabl in command line with : ``` diff --git a/front_update.sh b/front_update.sh index 8812cfd..7135cbf 100755 --- a/front_update.sh +++ b/front_update.sh @@ -24,6 +24,32 @@ cecho() { echo -e "$text" } +# vérifs prérequis + +if [ ! type nvm &> /dev/null ]; then + cecho red " ❌ la commande nvm est introuvable" + exit 1 +fi +cecho g " ✅ nvm" +if [ ! type node &> /dev/null ]; then + cecho red " ❌ la commande node est introuvable" + exit 1 +fi +cecho g " ✅ node" +if [ ! type git &> /dev/null ]; then + cecho red " ❌ la commande git est introuvable" + exit 1 +fi +cecho g " ✅ git" +if [ ! type yarn &> /dev/null ]; then + cecho red " ❌ la commande yarn est introuvable" + exit 1 +fi +cecho g " ✅ yarn" + +# use node version 16 +nvm use 16 + cd funky-framadate-front git reset --hard && git checkout $BRANCH && git pull cd .. @@ -72,7 +98,7 @@ COUNT_FILES=$(ls -larth ../public |wc -l) cd .. cecho b " $COUNT_FILES fichiers de build copiés dans /public" cecho g "##################################################################" -cecho b " renaming unieque name of JS chunks to common names for templates " +cecho b " renaming unique name of JS chunks to common names for templates " cd public mv runtime* runtime.js From 4d0b6a8aedf56896b6b91bd3d8e9e94ebe145049 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 21 Dec 2022 18:37:50 +0100 Subject: [PATCH 5/5] infos deps --- README.md | 12 ++++++++++++ funky-framadate-front | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) delete mode 160000 funky-framadate-front diff --git a/README.md b/README.md index 2bab0ed..08e4bb9 100755 --- a/README.md +++ b/README.md @@ -124,6 +124,18 @@ php bin/console doctrine:schema:validate ``` ## Getting started +Have the right dependencies, a domain name, and run the install script. +### Dependencies +* PHP 8+ +* symfony CLI tool +* composer, the PHP dependencies manager +* a database like Mysql +* a proper .env file +### run scripts +```bash +bash update.sh +symfony serve # to start the API on https://localhost:8000 +``` # Development install dependencies with Composer diff --git a/funky-framadate-front b/funky-framadate-front deleted file mode 160000 index 2820baa..0000000 --- a/funky-framadate-front +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2820baa227c48d780a0eca99acc5f660adbe03ea