Symfony 5.1 User/Security Bootstrap with EasyAdmin 3
security
login
create user as admin
reset password
mailer (register, reset)
Dependencies: docker, docker-compose
Start docker with (comment out nginx, php, frontend):
cp docker-compose-dist.yml docker-compose.yml
docker-compose up -d
docker-compose exec php composer install
docker-compose exec php bash reset_dev_db.sh
docker-compose exec php bash reset_test_db.sh
docker-compose exec php php bin/phpunit
Open your browser:
Login with one of created users:
[email protected] / root (admin user)
[email protected] / user (regular user)
Send email tests with:
php bin/console app:send-email --template=register [email protected]
Configure Mailer for register and password reset:
MAILER_DSN
MAILER_FROM
MAILER_FROM
How to configure mailtrap for mailer
How to configure gmail for mailer
Modify and generate emails with mjml:
docker-compose exec frontend npm install
docker-compose exec frontend npm run build:email
Put your custom css in:
public/css/admin.css
Check examples of templates overriding in:
/templates/bundles/
/templates/reset_password/
Run PHP CS Fixer with:
vendor/bin/php-cs-fixer fix -v
You will find rules in: .php_cs.dist
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to follow code style and update tests as appropriate.