Join us for a week of Symfony, November 19-23, at the Beurs van Berlage: • November 19-20: 2-day pre- conference workshops • November 21-22: 2-day conference (3 tracks and 1 Unconference) • November 23: 1-day Hackday Get an exclusive 10% discount on your registration using the code: SFC19PHPAMS Code available until June 26 2019 amsterdam2019.symfony.com
Come to meet the international Symfony and PHP communities! Become a Sponsor of the event! Support the framework and get visibility for your company during the conference! Contact us: [email protected] 1,000+ attendees and 30+ speakers will be there during our 2-day conference!
$ symfony new demo $ symfony new demo --cloud --debug # Want to try Symfony 5.0 (dev version)? $ symfony new demo --version=dev-master Creating a new project
$ symfony new demo # Forms are ❌ disabled as symfony/form is not installed $ composer req form # Forms are automatically ✅ enabled as symfony/form is installed + Auto-configuration
Parameter Class constant Environment variable Can be provided by a third party ("standard") ❌ ❌ ✅ Can be changed without cache:clear ❌ ❌ ✅ Easy to use in code ❌ ✅ Can be changed without redeploy ❌ ✅ Can be different in dev and prod ✅ ❌ ✅ Can be stored outside of a Git repo ✅ ❌ ✅ Rich type support via processors Example Configure behavior Configure behavior Configure infrastructure
Adding a Twig Extension Where do I store the Twig extension class? Which file do I need to change to register it? Which tag do I need to use? How do I declare a tag in YAML? Which interface/class do I need to implement/ extend? It’s too complex. What about doing it the dirty way and do it in the controller instead? hmm, ok
framework: messenger: transports: email: "%env(RABBITMQ_DSN)%" routing: Symfony\Component\Mailer\Messenger\SendEmailMessage: email $ docker-compose up -d Sending emails rabbitmq: image: rabbitmq ports: - 5672 docker-compose.yml Symfony Local Web Server Env vars "auto-wiring" Local port is random
I want to send rich and responsive emails from my controller via my provider's API asynchronously with AMQP and manage failures gracefully without Docker
$ symfony tunnel:open Sending emails Symfony Local Web Server Env vars "auto-wiring" .symfony.cloud.yaml relationships: rabbitmq: "rabbitmq:rabbitmq" Development ready framework: messenger: transports: email: "%env(RABBITMQ_DSN)%"