[UPDATED] Symfony 3.3 released! What changed?

Introduction

I am very excited about new Symfony release. Lot’s of things changed. This post puts everything in one place and highlights the most important changes.

Dependency Injection component

The dependency injection component had many changes. To improve RAD the service autoconfiguration was added as well as getters autowiring and getters injections. In my opinion, the most sexy change is adding the optional class for named services. It allows you to create a service without adding the direct class name.

In your controller/service, you can just retrieve it using the simple syntax

Full list of the changes with explanation you can find here.

Logs

Who likes upgrading libraries/frameworks? Nobody? That’s what I thought. Symfony added to his awesome developer toolbar a new tab with all deprecations.

 

New components

We have few new components:

WebLink component

Symfony supports the HTTP/2 even better and lets us link resources so they may be prefetched to increase loading of the websites.

Lock component

This new component was experimentally added to Symfony 3.3 but was removed for now and will have his second chance in Symfony4.

Dotenv component

Thanks to this component, loading from .env files is now built-in into Symfony. It helps to develop and manage configuration without deploying on production.

Webserver bundle

Do you like the PHP built-in server? Symfony uses it for a while and decided to move the functionality to a separate bundle.

Configuration

This component had not so many changes. The changes that are worth stressing are: adding support for defining custom YAML tags and reading config with glob patterns. The way we can get project’s root is simpler now.

Other improvements

They are many of other improvements. Most of them are listed below:

Incompatibility notice

Symfony follows backward compatibility promise, but from time to time they must break it to fix a security issue. This time it happened and trusted_proxis configuration key was removed.

Summary

That’s not all. I highly recommend following their blog and Fabien’s, too. I personally cannot wait for the Symfony 4 which changes the way we work with the framework.

Symfony 4 is comming. It will change the way we work with this framework, drops HHVM support.

UPDATE: The “trusted proxies” configuration was reverted because it caused problems with deploying applications with different proxy configuration on test, stage and prod env.

About author

Hi! I am Bartek. I'm a PHP developer but I other languages are not scary to me. My hobby is security and I try to learn as much as it's possible how to not be hacked. I like to know how things work. After hours I like playing Dota2 :)