New in Symfony 4.2: Define env vars per environment

Contributed by Kévin Dunglas in #28533. Since the introduction of the DotEnv component in Symfony 3.3, we’ve been working hard to improve the experience of using env vars to configure Symfony apps. In Symfony 4.2, we’ve added a new loadForEnv() method to allow you define different env vars per environment. Instead of creating a single…

New in Symfony 4.2: Better autowiring debug

Contributed by Nicolas Grekas in #28970. The debug:autowiring command displays all classes and interfaces that Symfony developers can use as type-hints for service autowiring. In previous Symfony versions, it looked like this when looking for something specific (e.g. the cache): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15…

A Week of Symfony #617 (22-28 October 2018)

This week, development activity focused on polishing the upcoming Symfony 4.2 version, which will be released in 5 weeks. We improved performance of service discovery for large applications and we optimized the way env vars are exported. We also improved the log filter in the Symfony profiler to support filtering by multiple criteria. Symfony development…

New in Symfony 4.2: Acceptable Request Formats

Contributed by Andrei Igna in #26486. The Accept HTTP header is added by browsers to their requests to advertise which content types they are able to understand. These content types are expressed as MIME types. The HttpFoundation component provides several utilities in its Request class to work with request formats and MIME types (such as…

New in Symfony 4.2: Simpler custom serialized names

Contributed by Fabien Bourigault in #28505. The Serializer component is able to transform property names when serializing objects. For example, it can transform camel-cased properties like $firstName into snake-cased values like first_name. For more complex cases, you can create name converters to map PHP property names to serialized names arbitrarily. In Symfony 4.2 we added…

New in Symfony 4.2: Important deprecations

Symfony’s Backward Compatibility Promise ensures smooth upgrades in your projects because it forbids backward compatibility breaks in minor releases. Instead of changing or removing existing features, we mark them as deprecated and change them in the next major Symfony version. The UPGRADE-4.2.md document explains all deprecations in details and you’ll see them too in the…

3 top reasons to come to SymfonyCon Lisbon 2018!

SymfonyCon Lisbon opens its doors from December 6th to December 8th. Join us for our annual international conference in Lisbon, Portugal, to attend the international Symfony reunion and meet with members of the Symfony community from all over the world! Secure now your ticket to the conference (including our famous Hackday) and our workshops at…

A Week of Symfony #616 (15-21 October 2018)

This week, Symfony 4.2 deprecated the kernel name and the usage of getRootDir() and kernel.root_dir. Meanwhile, the Form component added a new help_attr option and the Messenger component renamed and reorganized some of its classes. Symfony development highlights This week, 56 pull requests were merged (37 in code and 19 in docs) and 46 issues…

New in Symfony 4.2: Wait until processes are ready

Contributed by Maxime Veber in #27742. The Symfony Process component executes commands taking care of the differences between operating system and escaping arguments to prevent security issues. One of the features it provides is the wait() method, which blocks the app execution until the given process has finished. However, for some kinds of commands (such…