This post originally appeared on Symfony Station.
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.
Run Symfony commands inside a Docker container
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."
Integrating Keycloak with API Platform https://woutercarabain.com/webdevelopment/integrating-keycloak-with-api-platform/
Hanane Kacemi continues a series of posts on Symfony and Doctrine.
Symfony & Doctrine: Part 4
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."
Using custom PHP attributes for registering and configuring Symfony Messenger handlers
Programming Insider explores PHP Web Frameworks in this article.
Top 5 Fastest-Growing PHP Web Development Frameworks
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."
Documenting PHPStan + Drupal! https://mglaman.dev/blog/documenting-phpstan-drupal
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.
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.
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."
Major Drupal configuration schema cheat sheet update - 7 years later
Houssemeddine Souissi explores the new Symfony Authentication System (Login & Logout) in a fresh 5.4 project in this video and article.
New Authentication System
He also looks at RabbitMQ.
Discover RabbitMQ with Symfony 5 Project https://devbrains.tn/tutorials/discover-rabbitmq-with-symfony-5-project
Somehow, I missed these two posts from Tomas Votruba. He examines the Symfony HTTP Kernel component and when to use it.
When Symfony Http Kernel is too Big a Hammer to Use https://tomasvotruba.com/blog/when-symfony-http-kernel-is-too-big-hammer-to-use/
Decomposing Symfony Kernel: What does Minimal Symfony Bundle Do https://tomasvotruba.com/blog/decomposing-symfony-kernel-what-does-minimal-symfony-bundle-do/
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!"
PHP in 2022
In this extensive tutorial Eric, the Coder examines the recent additions to PHP.
Modern PHP crash course
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."
Php 8.1 New Features — Fibers
Jolicode helps us find out how to approach a clone without fear.
PHP Clone All The Things
The ability to return nulls makes it all too easy to write brittle software.
Null Return Types
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.
A library-less approach to fixtures in PHP tests https://dev.to/andreasprega/a-library-less-approach-to-fixtures-in-php-tests-54li
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."
Times in PHP Using Carbon
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."
Cookies and Sessions: A Gentle Introduction With PHP https://levelup.gitconnected.com/cookies-and-sessions-a-gentle-introduction-with-php-44acb3a6c483
Anders Björkland continues his series of articles examining the SilverStripe CMS.
Create reviews for Googled books (in SilverStripe) https://dev.to/andersbjorkland/create-reviews-for-googled-books-in-silverstripe-53do
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 them in multiple classes. Traits can't be initiated on its own like a normal class could."
PHP Traits Explained https://dev.to/eelcoverbrugge/php-traits-explained-197e
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."
PHP 8.1: more on new in initializers https://rafael.bernard-araujo.com/php-8-1-more-on-new-in-initializers.php
When open-source developers go bad
I didn't know this, but Alexandre Daubois tells us that the "Internet truly relies on 13 servers. How is it possible?"
The 13 Master Servers of Internet
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.
Learn How to Use DOM Selectors
Docker has a new capability.
Introducing SSO for Docker Business https://www.docker.com/blog/introducing-sso-for-docker-business/
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!
Founder Symfony Station