Portfolio of Edouard Proust, web developer (PHP , Symfony and Javascript) v.1.0: march 2022
This project is developped on GitLab: https://gitlab.com/solo-projects3/ep-portfolio.git
- PHP 7.4
- Symfony 5
- Symfony CLI
- Composer
- Docker
- Docker-compose
- NodeJS
symfony check:requirements
composer install
npm install
npm run dev
docker-compose up -d
symfony serve -d
If database not set up yet;
symfony console make:migration -n
symfony console d:m:m -n
symfony console d:f:l --group=dev -n
ssh deploy@<host>
git clone https://gitlab.com/<directory> .
- Replace by the host IP address (eg. 168.38.144.76)
- Replace by the direMy portfolio featuring my projects as a web developer.ctory slug (eg. /my-folder/my-project)
- For cloning from gitLab, use this command:
git clone https://gitlab.com/<directory>
APP_ENV=prod
MAILER_DSN=smtp://<dsn_host>
DATABASE_URL="mysql://<db_user>:<db_password>@<db_host>/<db_name>"
Don't precise "serverVersion" attribute in DATABASE_URL or this error may be fired: "The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue".
composer install
npm install
npm run dev
On first deployment only (database not set up yet);
symfony console make:migration -n
symfony console d:m:m -n
symfony console d:f:l --group=prod -n
php bin/console app:create:admin <username> <password>
- Add or Edit a global dir or file path to be used anywhere in the project:
Add or Edit a const in Path.php and then call it where you need:
Path::MY_PATH
- Add or Edit a global config value to be used anywhere in the project:
Add or Edit a const in Config.php and then call it where you need:
Config::MY_VALUE
- Add an new option (AdminOption) in Admin dahsboard: Add a new const in src/DataFixtures/AdminOptions.php
- Change fixtures default values: Edit const in src/DataFixtures/AppFixtures.php
-
Reorder toolbar: update
Editor.defaultConfig()
function in assets/ckeditor/builds/{build_name}/src/ckeditor.js -
Add plugins and features:
- Download package on NPM
- Run this command:
npm i @ckeditor5/ckeditor5-<plugin_name>
- Add this line after other import statements on the top of assets/ckeditor/builds/{build-name}/src/ckeditor.js : `import from '@ckeditor/ckeditor5-/src/.js';
-
Add a build:
- Configure and download package here
- Unzip it in assets/ckeditor/builds/{build-name}
- In assets/js/admin/ckeditor.js, update the first line:
import ClassicEditor from '../../../public/build/ckeditor/builds/<build-name>/src/ckeditor';
/!\ After any of the above actions:
- update
Editor.defaultConfig()
function in assets/ckeditor/builds/{build-name}/src/ckeditor.js - Run these commands:
npm run build
npm run dev
Build Encore assets on save:
npm run watch