Welcome to this week's Symfony Station Communiqué. It's your weekly review of the most valuable and essential news in the Symfony and PHP development communities. Take your time and enjoy the items most valuable for you.
*Please note that links will open in a new browser window. My opinions, if I present any, will be in bold.
As always, we will start with the official news from Symfony.
Highlight -> "This week, Symfony released the first versions of the recently open-sourced Symfony CLI project. In addition, Symfony announced the upcoming ending of Early Bird Tickets and Call for Papers period for the SymfonyLive Paris 2022 and SymfonyWorld Online 2022 Summer Edition conferences."
It's your last chance to get an Early Bird ticket for SymfonyWorld Online 2022 Summer Edition workshops, conference, or combo workshop and conference. The deadline is January 14th, 2022 11:59 pm (Paris time).
We just published our latest original content piece. It will be helpful if you are looking for a CMS for your next project.
Have you ever wondered which CMSs are built with Symfony? Well, probably not, but if you have this reference article shows which ones are and provides their relevant details.
Running a Symfony app inside a Docker container has a lot of advantages, but the downside is we have to type a longer command if we want to run the command inside the container. For this purpose, I wrote a small bash script to help me with that.
Wouter Carabain writes "securing your API endpoints is very important to prevent unauthorized access to your systems. But how do you do this efficiently? Are you going to build a user management system from scratch? Let me introduce you to Keycloak and how to integrate it with API Platform."
Hanane Kacemi continues a series of posts on Symfony and Doctrine.
Dejan Angelov says "Symfony Messenger provides multiple ways for registration and configuration of message handlers. Nowadays, the handlers are usually registered by implementing the component’s MessageHandlerInterface interface, which makes the handlers auto-configurable by default, or by implementing some interface of ours which we can register for autoconfiguration manually. However, with the addition of the attribute's functionality in PHP 8.0, it doesn’t really make sense anymore to use interfaces for the purpose of “describing” our classes. In this article, we’ll explore how we can use our own PHP attributes to register and configure the message handlers."
Matt Glaman writes in the early days of Drupal 9 most folks were only using PHPStan on their Drupal sites via drupal-check for deprecation checks. I am excited to see more folks using PHPStan directly with phpstan-drupal to perform static analysis and deprecation checks. However, folks are starting to hit some Drupal WTFs when performing static analysis on a magical code base."
We published our first sponsored article on Symfony Station exploring how Code Execution Monitoring helps you identify bugs and bottlenecks in your Symfony app before your customers do. Like all our articles it is now available via audio.
All sponsored articles are for products we have vetted and stand behind. We either use them or would do so if they were applicable to the Symfony Station site.
Gábor Hojtsy says "I apparently released the Drupal configuration schema cheat sheet 7 years ago (wow!) to help people adopt the then new format to describe configuration structure. I keep getting questions and requests about it, so decided to make a major update to it now and bring it to the present day for Drupal 9."
Houssemeddine Souissi explores the new Symfony Authentication System (Login & Logout) in a fresh 5.4 project in this video and article.
He also looks at RabbitMQ.
Somehow, I missed these two posts from Tomas Votruba. He examines the Symfony HTTP Kernel component and when to use it.
Brent writes "It's the fourth time I'm writing a yearly "PHP in 20XX" post, and I must admit I've never been as excited about it as this year: we've seen awesome new features added to PHP, with stuff like attributes, enums, promoted properties and fibers; and on top of that, the static analysis community is making great progress, my personal favorite feature is PhpStorm now supporting generics when writing code."
Exciting times are ahead, let's take a look at modern-day PHP!"
In this extensive tutorial Eric, the Coder examines the recent additions to PHP.
Backend Developer notes "are lots of new things in PHP and in this article, I will explain what fibers are and why we should use them in our projects."
Jolicode helps us find out how to approach a clone without fear.
The ability to return nulls makes it all too easy to write brittle software.
Andrea Spraga writes "At Slope, writing tests is a relevant part of our day-to-day work. Having to maintain many integrations and end to end (functional) tests, we are continuously required to create and manage fixtures." In this post, he shows us how.
Prosper Yong notes "date and time manipulation is one of a few frequently-experienced challenges of developing web apps in PHP. And one of its most prevalent issues is identifying time disparities and making them readable, such as "one hour ago".
However, handling dates and times — and issues such as this — is greatly simplified by using Carbon; it's a library which reduces lengthy hours of coding and debugging to only a few lines of code."
In this article, I will help you get an answer to those questions. Plus, I will show you some PHP functions you can use to implement cookies and sessions."
Anders Björkland continues his series of articles examining the SilverStripe CMS.
Eelco Verbrugge writes "in PHP a child class can inherit only from one single parent. This allows a class to reuse methods from vertical hierarchy by extending an Abstract class.
If you like to reuse methods in many classes in horizontal hierarchy, we use Traits. Traits are used to group methods and implement in multiple classes. Traits can't be initiated on its own like a normal class could."
Programming Insider explores PHP Web Frameworks in this article.
Rafael Bernard Araujo says of PHP Initializers "When I see this new feature, lots of places that use Dependency Injection come to my focus as candidates to be impacted, such as application or infrastructure service classes. As a result, we will write a much cleaner and leaner code without giving up good practices for writing modular, maintainable, and testable software."
Speaking of open-source, the MIT Technology Review notes that "volunteer-run projects like Log4J keep the internet running. The result is unsustainable burnout, and a national security risk when they go wrong." So, contribute to the PHP Foundation.
I didn't know this, but Alexandre Daubois tells us that the "Internet truly relies on 13 servers. How is it possible?"
Kadeisha Kean says "to inspect or update a web page dynamically, you need to access its elements. Find out how to use DOM selectors to target various parts of your page.
Docker has a new capability.
Have you published or seen something related to Symfony or PHP that we missed? If so, please contact us.
That's it for this week. Thanks for making it to the end of another extended edition. I look forward to sharing next week's Symfony and PHP news with you on Friday.
Please share this post. :) Be sure to join our newsletter list at the bottom of our site’s pages. Joining gets you each week's communiqué in your inbox (a day early). And follow us on Twitter at @symfonfystation.
Happy Coding Symfonistas!