May 30, 2018 Fabien Potencier

Symfony 4.1.0 is going to be released later today. 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.1 new features, but here is a curated list of the most relevant changes (this version has a total of 200 new small and big features):

New Components¶ Messenger (sroze) #24411 improved by many other pull requests: Allow to scope handlers per bus (ogizanagi, sroze) #27275 Uses custom method names for handlers (sroze) #27034 Add debug:messenger CLI command (ro0NL, sroze) #26803 Support configuring messages when dispatching (ogizanagi) #26945 Add a time limit receiver (sdelicata) #27130 Add a memory limit option for ConsumeMessagesCommand (sdelicata) #26975 Define multiple buses from the framework.messenger.buses configuration (sroze) #26864 Allow to configure the transport (sroze) #26941 Add AMQP adapter (sroze) #26632 Add a MessageHandlerInterface (multiple messages + auto-configuration) #26685 (sroze) Add a middleware that validates messages (Nyholm) #26648 Add a middleware that wraps all handlers in one Doctrine transaction. (Nyholm) #26647 Clone messages to show in profiler (Nyholm) #26650

(sroze) #24411 improved by many other pull requests:

Console¶ Add box-double table style (maidmaid) #26693

(maidmaid) #26693 Add box style table (maidmaid) #25301

(maidmaid) #25301 Modify console output and print multiple modifyable sections (pierredup) #24363

(pierredup) #24363 Add option to automatically run suggested command if there is only 1 alternative (pierredup) #25732

DependencyInjection¶ Validate env vars in config (ro0NL) #23888

(ro0NL) #23888 Add a simple CSV env var processor (dunglas) #25627

(dunglas) #25627 Allow binary values in parameters (bburnichon) #25928

Anonymous services in PHP DSL (unkind) #24632

Add support for variadics in named arguments (PabloKowalczyk) #24937

Form¶ Add choice_translation_locale option for Intl choice types (yceruto, fabpot) #26825

(yceruto, fabpot) #26825 Add a data_help method in Form (mpiot, Nyholm) #26332

(mpiot, Nyholm) #26332 Ability to set rounding strategy for MoneyType (syastrebov) #26767

FrameworkBundle¶ Add PSR-11 "ContainerBag" to access parameters as-a-service (nicolas-grekas, sroze) #25288

(nicolas-grekas, sroze) #25288 Add ControllerTrait::getParameter() (chalasr) #25439

(chalasr) #25439 Add support to 307/308 HTTP status codes in RedirectController (ZipoKing) #26213

(ZipoKing) #26213 Deprecate bundle:controller:action and service:method notation (Tobion) #26085

(Tobion) #26085 Allow fetching private services from test clients (nicolas-grekas) #26499

Add command to delete an item from a cache pool (pierredup) #26223

framework.php_errors.log now accept a log level (Simperfit) #26504

Keep query in redirect (Simperfit) #26281

Add the ability to search a route (Simperfit) #26121

Add cache.app.simple psr simple cache (dmaicher) #25710

Add email_validation_mode option (xabbuh) #25478

Add atom editor to ide config (lexcast) #25415

HttpFoundation¶ Add a migrating session handler (rossmotley) #26096

(rossmotley) #26096 Add HeaderUtils class (c960657) #24699

Split FileException into specialized ones about upload handling (fmata) #26475

RedisSessionHandler (dkarlovi) #24781

Process¶ Introduce signaled process specific exception class (Soullivaneuh) #25775

Make PhpExecutableFinder look for the PHP_BINARY env var (nicolas-grekas) #25629

Create a "isTtySupported" static method (nesk) #25142

Routing¶ Allow no-slash root on imported routes (nicolas-grekas) #26284

(nicolas-grekas) #26284 Allow inline definition of requirements and defaults (nicolas-grekas) #26518

(nicolas-grekas) #26518 Implement i18n routing (frankdejonge, nicolas-grekas) #26143

(frankdejonge, nicolas-grekas) #26143 Match 77.7x faster by compiling routes in one regexp (nicolas-grekas) #26059

(nicolas-grekas) #26059 Parse PHP constants in YAML routing files (ostrolucky) #25293

Serializer¶ Cache the normalizer to use when possible (dunglas, nicolas-grekas) #27049

Allow to access to the context and various other infos in callbacks and max depth handler (dunglas) #27017

Added a ConstraintViolationListNormalizer (lyrixx) #22150

Ignore comments when decoding XML (q0rban) #26445

Add a MaxDepth handler (dunglas) #26108

add a constructor argument to return csv always as collection (Simperfit) #25218

add a context key to return always as collection for XmlEncoder (Simperfit) #25369

Fix security issue on CsvEncoder about CSV injection (welcoMattic) #24508

default_constructor_arguments context option for denormalization (Nek-) #25493

Serialize and deserialize from abstract classes (sroze) #24375

Parse PHP constants in YAML mappings (ostrolucky) #25294

Twig¶ Make csrf_token() usable without forms (xabbuh) #25197

(xabbuh) #25197 Add priority to twig extensions (Brunty) #24777

Do not normalize array keys in twig globals (lstrojny) #26770

Deprecate "false" in favor of "kernel.debug" as default value of "strict_variable" (yceruto) #25780

Security¶ Allow using custom function inside allow_if expressions (dmaicher) #26660

(dmaicher) #26660 Deprecate AdvancedUserInterface (iltar) #23508

(iltar) #23508 Add configuration for Argon2i encryption (CoalaJoe) #26175

Make security.providers optional (MatTheCat) #26787

Validator¶ Html5 Email Validation (PurpleBooth) #24442

(PurpleBooth) #24442 Deprecated "checkDNS" option in Url constraint (ro0NL) #25516

Deprecate use of Locale validation constraint without setting "canonicalize" option to true (phansys) #26075

(phansys) #26075 Support protocolless URLs validation (MyDigitalLife) #24308

Add canonicalize option for Locale validator (phansys) #22353

Add option to pass custom values to Expression validator (ostrolucky) #25504

VarDumper¶ Add dd() helper == dump() + exit() (nicolas-grekas) #26970

(nicolas-grekas) #26970 Introduce a new way to collect dumps through a server dumper (ogizanagi, nicolas-grekas) #23831

(ogizanagi, nicolas-grekas) #23831 Provide binary, allowing to start a server at any time (ogizanagi) #26654

Add a GMP caster in order to cast GMP resources into string or integer (Simperfit) #25237