Symfony 4 is a very different framework from the previous versions. Symfony 4 provides a new developer experience on a very stable foundation. Learn more about how you can quickly develop new applications and how you can grow your projects from a micro-style app to a full monolith or a set of micro-services.
12. $ symfony new demo --version=dev-master --debug
Demo
13. $ tree -I vendor
$ find . -type f | wc -l
Symfony 4 is lightweight
Only 16 files
vs 31 SE
3300 total
vs 8867 SE
-65%
14. New directory structure
• Less depth, easier to navigate
• Non-PHP files in their own directories
(assets/, templates/)
• Decoupled from Symfony (assets/, src/,
templates/, public/)
25. Aliases
• Shortcuts for common packages (log, behat,
phpunit, …)
• Optimized for Symfony Components (no need
to use the symfony/ prefix, just workflow, dom-crawler, …)
• Opinionated choices (admin, api, orm, mailer, test,
…)
26. Packs
• Bundle several dependencies into a
consistent set (debug, profiler, api, test, …)
$ composer req debug
37. AddingaTwigExtension
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
61. Symfony 4 recap
• Auto-configuration for any Composer package
• A Maker bundle to simplify creating files
• No boilerplate code, just business logic
• Controllers and commands as services
• From micro to monolith
• Meta-packages doing a lot for you out of the box
Productivity
boost!
Better DX
70. Predictable releases and support
https://symfony.com/releases
•Every month: a patch release
•Every 6 month: a minor release
•Every 2 years: a major release
•On the go: security releases
71. Predictable releases and support
Release
end of
support
+8 months +14 months +36 months +48 months
end of security
support
end of security
support
end of
support
Standard Releases
(3.3, 4.0)
LTS Releases
(2.8, 3.4)
75. Scale from micro to monolith
13 files
15 dependencies
start with
…and grow as you see fit
via automation
76. Community oriented
• Code of conduct
https://symfony.com/conduct
• Enforced by the CARE team
https://symfony.com/care
• Respectful Review Comments
https://symfony.com/doc/current/contributing/community/review-comments.html
Diversity initiative
https://symfony.com/diversity