Symfony 4.2.0 is going to be released in a few days. As for any other Symfony minor release, our backward compatibility promise applies and this means that you should be able to upgrade easily without changing anything in your code.
We've already blogged about the great 4.2 new features, but here is a curated list of the most relevant changes (this version has a total of 240 new small and big features):
Messenger
The messenger component is still marked as experimental in 4.2.
- Add a trait for synchronous query & command buses (ogizanagi) #29167
- make dispatch(), handle() and send() methods return Envelope (nicolas-grekas) #28983
- Add handled & sent stamps (ogizanagi) #29166
- remove AllowNoHandlerMiddleware in favor of a constructor argument on HandleMessageMiddleware (nicolas-grekas) #28945
- make Envelope first class citizen for middleware handlers (nicolas-grekas) #28914
- rename "envelope items" and move them in the "Stamp" namespace (nicolas-grekas) #28911
- Change AmqpExt classes constructor signature (fabpot) #28419
- Uses a messenger serializer, not an individual encoder/decoder (sroze) #28405
- Add a SenderLocator decoupled from ContainerInterface (fabpot) #28399
- Trace middleware execution in the profiler (ogizanagi) #27321
- Uses Symfony Serializer by default for envelope items (sroze) #28270
- Add a --bus option to the messenger:consume-messages command (chalasr, sroze) #28190
- Only subscribe to a given bus from the MessageSubscriber (sroze) #28275
- Support configuring messages when dispatching (ogizanagi) #26945
VarDumper
- add caster for Memcached (jschaedl) #28622
- add casters for IntlDateFormatter and IntlCalendar (jschaedl) #28566
- add caster for IntlTimeZone (jschaedl) #28559
- add caster for NumberFormatter (jschaedl) #28555
- add caster for MessageFormatter (nicolas-grekas) #28551
- Scroll into view when searching (ro0NL) #28854
- Allow to use a light theme out of the box (ogizanagi) #27261
- Allow dd() to be called without arguments (SjorsO) #28317
- New env var to select the dump format (dunglas) #25125
- make RedisCaster handle RedisCluster and dump all options on all drivers (nicolas-grekas) #28264
- display the signature of callables (nicolas-grekas) #27768
Cache
- Add stampede protection via probabilistic early expiration (nicolas-grekas) #27009
- add CacheInterface::delete() (nicolas-grekas) #28718
- added support for connecting to Redis clusters via DSN (nicolas-grekas) #28713
- support configuring multiple Memcached servers in one DSN (nicolas-grekas) #28598
- Add MarshallerInterface allowing to change the serializer, providing a default one that automatically uses igbinary when available (nicolas-grekas) #27645
- Allow configuring PDO-based cache pools, with table auto-creation on first use (nicolas-grekas) #27694
- added support for phpredis 4 compression and tcp_keepalive options (nicolas-grekas) #27646
- Use sub-second accuracy for internal expiry calculations (nicolas-grekas) #27031
Translation
- Added intl message formatter (aitboudad, Nyholm) #27399
- Use ICU parent locales as fallback locales (thewilkybarkid) #28070
- allow using the ICU message format using domains with the "+intl-icu" suffix (nicolas-grekas) #28952
- Added support for multiple files or directories in XliffLintCommand (yceruto) #28522
- Added support for translation files with other filename patterns (javiereguiluz) #27655
- marked getFallbackLocales() as internal (boscho87) #28626
- Register an identity translator as fallback (yceruto) #28523
- TranslationUpdate change default output to xlf (Alexis BOYER) #27935
WebProfilerBundle
- Add channel log filter (ro0NL) #28934
- Replay referer URL (ro0NL) #28936
- Extract server parameters into their own tab (fabpot) #28763
- Append new ajax request to the end of the list (BoShurik) #27763
- Show relative path of the template and improving panel view (yceruto) #27978
- Display uploaded files in the profiler (javiereguiluz) #26946
Security
- Add voter individual decisions to profiler (l-vo) #27914
- Add "is_granted()" to security expressions, deprecate "has_role()" (nicolas-grekas) #27305
- add port in access_control (roukmoute) #28061
- Deprecate simple_preauth and simple_form in favor of Guard (chalasr) #28693
- make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_* (nicolas-grekas) #28446
- Remember me: allow to set the samesite cookie flag (dunglas) #27976
- No more support for custom anon/remember tokens based on FQCN (Iltar van der Berg) #26981
FrameworkBundle
- Add a new method AbstractController::addLink() (dunglas) #28875
- Add vscode editor to ide config (lexcast) #28679
- make debug:autowiring list useful services and their description (nicolas-grekas) #28970
- Deprecate Controller (sroze) #28243
- Added new "auto" mode for framework.session.cookie_secure to turn it on when https is used (nicolas-grekas) #28244
- Add SameSite cookies to FrameWorkBundle (rpkamp) #28168
- Add LoggerAwareInterface to auto configuration (GaryPEGEOT) #28176
- allow turning routes to utf8 mode by default (nicolas-grekas) #27774
- show public/private for aliases in debug:container command (OskarStark) #27551
- Allow configuring taggable cache pools (nicolas-grekas) #26934
Miscellaneous
- [Twig] Added template "name" argument to debug:twig command to find their paths (yceruto) #27981
- [Twig][Form] Add help_attr (mpiot) #27043
- [WebServerBundle] Added ability to display the current hostname address if available when binding to 0.0.0.0 (respinoza) #28586
- [Yaml] Added support for multiple files or directories in LintCommand (yceruto) #28521
- [HttpFoundation] Make ResponseHeaderBag::makeDisposition static (fabpot) #28807
- [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0 (nicolas-grekas) #28447
- [BrowserKit] Adds support for meta refresh (jhedstrom) #27118
- [LDAP] Add verbose ext-ldap error if present for easier debugging (scaytrase) #28424
- [LDAP] Add "applyOperations" method to EntryManager (mablae) #27069
- [Intl] Blacklist invalid languages (ro0NL) #28833
- [PropertyInfo] Implement "Collection" types in PhpDocExtractor (popy-dev) #26300
- [PropertyInfo] Add an extractor to guess if a property is initializable (dunglas) #26997
- [Routing] Add fallback to cultureless locale for internationalized routes (fancyweb) #27957
- [Doctrine] type guesser simple json array support (iluuu1994) #24297
- Added different protocols to be allowed as asset base_url (alexander-schranz) #28476
- Redesigned the default error page in production (javiereguiluz) #27699
- [ProxyManagerBridge] allow proxifying interfaces with "lazy: SomeProxifiedInterface" (nicolas-grekas) #27697
- [Config] deprecate tree builders without root nodes (xabbuh) #27476
- Display the log context in the debug pages (javiereguiluz) #24151
- CacheWarmerAggregate handle deprecations logs (ScullWM) #27421
I wish I had been so productive like Nicolas. :D
I don't find sense deprecate the Controller , since AbstractController doesn't contain the container, and all documentation of 4.2 use $container, I looks like you want to definitely remove, besides getParameter also says deprecate, then how do you get the configuration parameters? Does it have to be bind? This forces you to inject it which sometimes I don't need.
Okay, I saw how to get the parameters, thank you.