I had the pleasure of attending Symfony Live London this year. Traditionally Studio 24 is a Zend Framework development shop, but recently we've been looking at a few next generation frameworks so I was interested to find out more about Symfony and its community.
Last week I attended SymfonyCon in Brussels along with my colleague Gareth. SymfonyCon is the annual conference for Symfony developers and it’s the first time we both attended (I’d previously attended the smaller SymfonyLive London event). With 1,200 attendees from 42 countries it’s a pretty big event with talks across a range of subjects including new Symfony components, testing, DevOps, remote work, mental health, open source, front-end development, and more.
The venue was the Square convention centre, a spacious, modern space in the centre of Brussels. I was happy to hear about sustainability efforts, with unused food going to local food banks and recycling. Apart from Boye & Co events, this is the only other conference I’ve been to that has taken the fairly simple step of recycling conference badges and lanyards. The sponsor merch I picked up was either good quality (Platform.sh water bottles) or recycled (SymfonyCast pens).
Symfony project lead Fabien Potencier opened the conference with news of the upcoming Terminal component which aims to manage sophisticated ways to output text, colour and layout to the terminal. He demoed examples of coloured text, multi-column layout, even scrollbars! It works alongside the existing Console component and is likely to be fully released in Symfony 8. It looks very powerful, though it did make me wonder about the accessibility of poor text colour contrast (something that can probably be tested for using WCAG colour contrast rules).
Bruno Henrique de Souza talked about managing a process in your application with Symfony Workflow. It was a nice introduction to the component and the terminology used (places, transitions, and marking to indicate status). I also liked the feature to output a workflow as a diagram or UML.
Platform.sh launched their new service, Upsun, a platform as as service (PaaS). Part of the service setup included choosing a cloud provider to set up your hosting in. The carbon footprint of that region was displayed which is a nice way to encourage greener hosting.
Nils Adermann, creator of Composer and Packagist – the excellent package manager for PHP that has driven so much innovation, talked about how to audit your software supply chain. A topic that has become more important for us as we work with larger public sector and not-for-profit clients. He mentioned Supply-chain Levels for Software Artifacts (SLSA), a standard started by Google to help document the software supply chain, and Roave Security Advisories, a tool to block installation of insecure code.
I attended a valuable unconference talk by Daniëlle Suurlant called Let’s talk about burnout. She talked about the 6 common reasons for burnout, and how some employers practise toxic positivity, basically assuming everyone is always OK and if they’re not they don’t belong. Being more open about mental health and supportive is more likely to help your team. Daniëlle’s key message was to ask for help. Interestingly, stats show women are twice as likely to report burnout than men, even though it affects a similar number of men and women. If burnout affects you then leadership needs to step up to help structure your work. If you want to support a co-worker, establish trust, talk about problems you’re having, and support each other.
One message that came through clearly at the conference is the need to support the creators of open source, who often work for free on critical parts of the web. The PHP Foundation exists to help support the core development of PHP and companies and individuals can offer support. It’s great to see Craft CMS and Automattic (WordPress) as founder supporters – both CMSs we use a lot.
You can also support individuals who create important parts of the PHP ecosystem via GitHub Sponsors or by simply hiring them to help with your project.
Nicolas Grekas closed Thursday by talking about the PHP Foundation and how they fund 6 developers working on core PHP. The areas they work on is decided by the foundation, but the direction the PHP language takes still remains with the PHP Internals mailing list.
A few things he shared on current projects include a new autoloading mechanism, property hooks (a virtual property that executes code when you access it), generics, lazy objects, clone with (clone an object with some differences), JSONSchema support and PECL overhaul.
On Friday Fred Plais and Caroline Leroy of Platform.sh talked about “Is remote the past or future of work.” This was a great talk and highlighted what worked and didn’t for them as a remote-first company.
Things that are challenging include:
- You need more process
- Low context communication
- Write everything down
- Set clear objectives, timeslines, deadlines
- Use async communications & tools
It’s important to trust people. Be clear and transparent, over communicate.
They had to be really intentional about how they work. Thinking carefully about team management and manager relationships with their reports.
They did highlight it can be super demanding. You need a culture of information sharing and good communication. A high level of autonomy is required, which can be hard for some people (especially juniors – they are still working out how to do that well). There are mental health risks, you need to be intentional about your work and life routines. Some in person interactions needed.
After the talk another attendee shared the excellent GitLab Remote Handbook, which has lots of practical tips on how they work remote.
Guillaume Loulier gave a good introduction to open source search system Meilisearch. It sounds like a good alternative to the likes of ElasticSearch. But I was also intrigued when he mentioned Loupe, an SQLite search project.
I always like talks on testing and Ramona Schwering’s talk on “It’s a (testing) trap!” was no exception. She explained a few sensible tips on better tests, including:
Use the 3-part rule for better test naming:
- What’s being testing
- Under what circumstance is the test run
- What should happen inside of this test scenario
For clearer test code use the Arrange, Act, Assert (AAA) pattern:
- Setup first (arrange)
- Do the things you need to do to get the test to fail or pass (act)
- Check the scenario (assert)
Don’t use lorem ipsum, use realistic naming rather than placeholders that may confuse.
Anne-Julia Seitz talked about exception handling. She made a few good, important points.
Exceptions shouldn’t be used as control structures. Reserve exceptions for errors, unexpected code. Her example was a code block that used exceptions to detect things like failed payments in an e-commerce system. The failed payment is an expected outcome that should be dealt with differently.
Create a domain exception interface for your application and extend your exceptions from SPL exceptions such as RuntimeException or LogicException. This gives developers more flexibility when catch exceptions in your code.
And if you can gracefully continue after an exception (and log it), you should do so.
Ryan Weaver of SymfonyCasts ended the conference with an energising talk on “Hands-on with LiveComponents, AssetMapper, Turbo & Stimulus.” His talk was really refreshing and he talked about old complex ways of front-end development being replaced by modern, standards-based techniques.
His big message was No Build, moving away from high complexity on the front-end build process to just using standards technology such as import maps to load JavaScript and not worrying about multiple files because HTTP/2 supports loading multiple files more efficiently (though you still get load time lag if you’re loading from multiple domains).
He did a live demo of using Symfony’s Asset Mapper, which has 2 tools to generate versioned assets (to help use long cache lifetimes) and loading JavaScript via import maps (avoiding the need for code bundling).
He also demoed Turbo and Stimulus, tools created by the Basecamp team to help create JavaScript interactivity with very little JavaScript at all. For example live search and modals (it was nice to see Ryan used the dialog HTML element).
Ryan’s published a free video tutorial on how to use Live Components, AssetMapper, Stimulus & Turbo on SymfonyCasts that is free until 15 Jan. This is one we’ll definitely be checking out.