SymfonyLive London 2018: summary

Les-Tilleuls.coop
4 min readOct 8, 2018

--

This September, our team traveled to London to be part of SymfonyLive London, the annual rendezvous for Symfony enthusiasts. More than 300 people attended this event. Let’s review the highlights of this conference day!

Fabien Potencier’s keynote

Fabien Potencier had raised the pressure for a few days on Twitter: he would make an announcement during his Keynote!

He first took a few minutes to tell that this announcement would not be an alternative to Nova. Indeed, Symfony has been providing admin generators since 2005 and already has a pretty and powerful admin: API Platform Admin (great moment of pride, this software was created by our co-operators). Fabien also reminded that, unlike Nova, API Platform Admin is free and open source!

He then noted that Swiftmailer is becoming more and more complicated to maintain. Its code does not follow Symfony’s development standards and nobody really plunges into this code anymore… Fabien has worked on a modern successor to Swift Mailer 6: Symfony Mailer.

Symfony Mailer takes the fundamentals that made SwiftMailer so popular. The code has been completely redesigned to standardize it, simplify it, and to make it more maintainable and more flexible. In addition, it adds a lot of new features to take advantage of modern mailing platforms such as Postmark or Mailgun. Here are some of the main ones:

  • Multi transport support (Gmail, Mailgun, DSN, SMTP, possibility to use APIs such as Postmark)
  • Syntax defining fail over and/or load balancing transports
  • Integration of Twig for email templating
  • Inline style management via Encore
  • Need something asynchronous? This bundle allows native integration with the Messenger component!

The last point addressed during this keynote: clicks tracking, bounces and other statistics are an essential need for any modern project. With SMTP, it is complex, but the arrival of web hooks will simplify the tasks. Surprise: they are natively supported by the new library!

Symfony without the framework bundle

Tobias Nyholm then explained to us how to improve performance of an application through several stages.

The first (and the least expensive): buy a bigger server, add cache and finally, run less code. Symfony has drastically reduced this number thanks to the Flex component, but that’s still not enough. For a more efficient application, limit your code to the bare essentials and remove everything you do not need.

Maybe you only need the router? Or only cache? The minimum could then be the HttpFoundation component with the Cache component. A little more complexity? Then add the MicroKernelTrait.

In short, the idea is: use only the bare minimum you need. Just fill in the necessary. Is it really useful? It was demonstrated with an application responding in less than 3ms.

Panther: test your Symfony apps with real web browsers

Our co-operator Kévin Dunglas then presented the Panther component, which reached 1000 stars on Github during this conference day. As we have already presented you this component several times, we invite you to refer to our previous blog posts if you want to know what it consists of.

Kévin first gave an overview of the different components used to test his Symfony application and insisted on the need to make a “test pyramid”:

Panther is at the top of this pyramid with end-to-end tests. Testing your application with Panther is a necessity if it contains JavaScript, but it is not enough: you have to test the application at each level of the pyramid: unit, functional and end-to-end (not forgetting, of course, the manual testing).

After presenting different features of Panther and some new ones, Kévin also announced the release of new “helpers” drastically simplifying the creation of E2E tests based on the database and on fixtures. These new helpers are already available: https://github.com/hautelook/AliceBundle#database-testing.

Check out his slides:

Take your Http caching to the next level with xkey & Fastly

Andre Rømke showed us the use of a recent feature of Varnish through a Symfony application: xkey.

In a nutshell, xkey brings surrogate-key to Varnish 4.1 or later through a module. This module provides a cache invalidation system thanks to tags and above all, makes it possible to invalidate the cache for several tags simultaneously. Another important feature is the ability to perform soft purge for a given item.

In short, xkey is a must-have for any application requiring fine control over cache management!

Running Symfony on AWS Lambda

Neal Brooks showed us that it is possible to run the Symfony and API Platform frameworks on AWS Lambda thanks to Bref.

There are some subtleties of configuration or performance to know, but everything has been covered! This talk was very complete, it would not do him justice to summarize it in 3 lines, so go see his slides!

Building first-class REST APIs with Symfony

Want to create a REST API and find out what are the best practices? Michael Cullum has the answer. He first brings us through what REpresentational State Transfer is and goes over in detail the different basic principles behind this acronym.

Through his slides, you will be able to build a reliable API which respects the REST principles, and if you want to save time, use API Platform (everything is already covered, and much more!).

Once again, this SensioLabs event was a real success. Congratulations to their team for this new edition! On our side, we look forward to seeing you in Lisbon for SymfonyCon!

--

--

Les-Tilleuls.coop

French self-managed worker cooperative. Creators of @ApiPlatform and Symfony contributors. PHP, Javascript & eCommerce consultants and web developers.