Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Say hello to redesigned Cloudways, an empowering Startup Program, enhanced Staging, a new Let’s Encrypt Wildcard SSL certificate feature, and more. GET STARTED

Learn What’s New in Symfony 3.1

Updated on July 13, 2016

4 Min Read
Reading Time: 4 minutes

Symfony 3.1 has been released and experts consider it the most stable version of the framework so far. To bring the readers up to speed with the framework, I have started a  series of blogs on Symfony 3.1 covering basics such as Up And Running With Symfony 3.1 and To-do App Using Symfony 3.1

What's new in Symfony 3.1

In this blog, I will highlight the new features and components introduced in the latest release of the framework. I will discuss the major changes and updates introduced in this release. You can visit the GitHub pull request links by clicking the pull request code at the end of the description:

The following is a quick list of the areas that have received updates/revisions.

  • LDAP
  • YAML
  • Process
  • Serializer
  • Console
  • HTTPKernel
  • Form
  • Security

Let’s take a bit detailed look at each of the above component so that you could read about the update and get the GitHub pull requests.


Lightweight Directory Access Protocol (LDAP) is an open industry standard used for assessing and maintaining distributed directory information service over the network. When it comes to information sharing, LDAP is trusted by every stakeholder. Symfony introduced LDAP as a component in the 3.0 version, which provided integration with Symfony security component. In version 3.1, LDAP gets some major updates.

  • Option to configure all available LDAP options for connection [18725]
  • Check whether an entry attribute exists [18492]
  • Added default service name for the security components [18387]
  • Add write support for the LDAP component [17817]


YAML stands for “YAML Ain’t Markup Language”. It is used extensively in Symfony to convert YAML strings to PHP arrays and vice versa. YAML is mainly used for its configuration files, blueprints, and in page settings. YAML is a very popular component and has received some major updates.

  • Introduced flags to customize the parse behaviour [17730]
  • Added option to dump objects as maps [17728]
  • Parsing the !!php/object tag is now deprecated [17462]
  • Added support to parse and dump DateTime objects [17836]
  • Added support for parsing the !!binary tag [17863]


The Symfony Process component executes commands in subprocesses. The component takes care of the subtle differences between the different platforms when executing the command.The Process component provides an object-oriented abstraction on top of proc_* functions to execute independent processes in PHP. It has been updated in Symfony 3.1 .

  • IteratorAggregate to stream output is implemented [18414]
  • Added support to Traversable Input [18350]
  • A callback is now allowed whenever the output is disabled [17427]


Symfony comes with a Serializer component that converts objects into specific format like JSON, XML,YAML, etc. Serializer allows encoders to only deal with encoding specific formats into arrays and vice versa. The Serializer service is not available by default and you need to activate it from config file. This component has received updates in Symfony 3.1.

  • Added forward and redirection detection in WDT (HeahDude) (17589)
  • Added more information in the security profiler (javiereguiluz) (17887)
  • Added status code to search form (oktapodia) (17125)
  • Added HTTP return code in the Ajax request list table (kucharovic) (17540)


The Console component makes it easy to create beautiful and testable command line interfaces. This component allows creation of command-line commands which are then used to perform specific recurring tasks from console such as cron jobs, imports, or other batch jobs.  Before Symfony 3.1, commands could not be registered privately. However, in this release, the component has received several updates:

  • Private commands are allowed to be registered privately [18101]
  • Added ApplicationTester support to test stdout and stderr [17255]
  • Added non-auto column width functionality [17761]
  • Added truncate method to FormatterHelper [16652]


The HTTPKernel component works using request-response model. It uses the “eventdispatcher” component to convert request into response through a structured process. Every HTTP web interaction depends on request and its related response. Usually, a PHP snippet is used to read the request and carry out relevant action. In Symfony 3.1, HTTPKernel received some minor updates including:

  • Deprecated passing objects as URI attributes to the ESI and SSI renderers [17611]
  • Added the kernel.controller_arguments event [18440]
  • Added an ArgumentResolver with clean extension point [18308]


Forms are often the UI that the users see on a website. Forms are used to get user input for CRUD operations. Symfony uses HTML forms and PHP generated forms generated using arrays and APIs. The Form component focuses on processing data to and from the client and the application. The Form component has some updates including:

  • LazyChoiceList and DoctrineChoiceLoader are optimized [18359]
  • Deprecated form types as services [18356]
  • Deprecated the “choices_as_values” option of ChoiceType [16994]


The Security component provides a firewall within and outside of the webapp to protect it from security threats and exploits. From authentication to certified login, this component ensures that the developers have all the tools to integrate security into the webapp. An important option is the creation of custom policies and security rules. Mainly it has four subcomponents; security-core,security-HTTP,security-csrf,security-acl used for security purposes. Some of the major updates for Security component in Symfony 3.1 are:

  • Use auth trust resolver to determine anonymous in ContextListener [18211]
  • Added new TargetPathTrait to get/set the authentication “target_path” [17714]

These are some of the major component updates in Symfony 3.1. I hope that you have found the description useful. You can also view the complete guide and changelog at the Symfony’s official site.


Symfony 3.1 is the latest and the most stable release of the framework to date. Although Symfony 3.2 has also been released, it is still unstable and require further work. I recommend that you start using Symfony 3.1 for your next development project. If you need an introduction to the framework, you could follow my tutorial series on Symfony. Another good resource is Symfony’s Living on the Edge blog series.

Please leave a comment if you discover any issues or have a query.

Happy Coding!

Share your opinion in the comment section. COMMENT NOW

Shahroze Nawaz

Shahroze is a PHP Community Manager at Cloudways - A Managed PHP Hosting Platform. He’s always in search of new frameworks and methods to implement them. Besides his coding life, he loves movies and playing soccer with friends. You can email him at

Create PHP websites without the worry of server management.

Deploy your PHP app on optimized PHP hosting servers.

Get Our Newsletter
Be the first to get the latest updates and tutorials.