My application to try some stuffs about Symfony 4 In this project, I'm trying to use various components of Symfony like :
- Authentication
- Service container
- Listener
- Subscriber
- Data transormers
- Monolog
- Guard Authentication
- Webpack Encore
this list should evolve.
Also, to improve this project, I'm using some tools like :
This project require
$ git clone https://github.com/pifaace/symfony-blog.git
$ docker-compose run --rm --no-deps blog-server composer install
$ docker run --rm -it -v $(pwd):/application -w /application node yarn run install
I'm using Webpack encore to build assets. Some commands are available, you can run those in a container like :
$ docker run --rm -it -v $(pwd):/application -w /application node yarn encore dev
$ docker run --rm -it -v $(pwd):/application -w /application node yarn encore dev --watch
$ docker run --rm -it -v $(pwd):/application -w /application node yarn encore production --progress
Just notice that, running those in a container do not trigger webpack-notifier. You should run these commands directly on your host to use it. In this case be sure you have yarn installed.
$ docker-compose up -d
$ start http://localhost:8000/ # Windows
$ open http://localhost:8000/ # Mac
$ docker-compose stop
$ docker-compose exec blog-server php bin/console doctrine:migrations:migrate
And run datafixtures
$ docker-compose exec blog-server bin/console hautelook:fixtures:load
You can connect as admin with these infos :
login : admin
password : azerty
To use features that implements swiftmailer, you need to add a MAILER_URL in .env You can use mailtrap for your developments, so your MAILER_URL should look like this :
MAILER_URL=smtp://smtp.mailtrap.io:25?encryption=&auth_mode=cram-md5&username=your_username&password=your_password
For registration with Github, you should register your own OAuth app, follow this link for a quick tutorial. The authorization callback URL should be :
http://localhost:8000/login/github/callback
When your app created, you should get a client ID and client secret, remplace these informations in the .env file in the right section. and that's it !
$ docker-compose run --rm blog-server ./bin/phpunit
This project is released under the MIT license.