Symfony Station Communique - 31 December 2021. A Look at Symfony and PHP News.
Tags: symfony, php, drupal, docker
Published: 2021-12-31 17:07:39

This post originally appeared on [Symfony Station](
https://www.symfonystation.com/Symfony-Station-Communique-31-December-2021).
 
Welcome to this week's Symfony Station Communique. It's your weekly review of the most valuable and essential news in the Symfony and PHP development communities. There was not much Symfony news this week, so we are expanding coverage of general coding articles in our Other section. Take your time and enjoy the items most valuable for you.
 
###And more importantly, we want to wish you a Happy New Year!
 
Thanks to Javier Eguiluz and Symfony for sharing [our last communique](https://www.symfonystation.com/Symfony-Station-Communique-24-December-2021) in their [Week of Symfony](https://symfony.com/blog/a-week-of-symfony-782-20-26-december-2021).
 
 
*Please note that links will open in a new browser window. My opinions, if I present any, will be in bold.
 
 
##Symfony
 
 
As always, we will start with the official news from Symfony.

Highlight -> "This week, Symfony development activity was low because of the Christmas holidays and focused on fixing various small bugs. Meanwhile, the upcoming Symfony 6.1 version, to be released in May 2022, introduced a new feature to create draft emails."

A Week of Symfony #782 (20-26 December 2021)       

https://symfony.com/blog/a-week-of-symfony-782-20-26-december-2021          

 
I ran across this in the Symfony Docs. It's a good one to bookmark.

Quick Tour / The Big Picture 
https://symfony.com/doc/current/quick_tour/the_big_picture.html


The open-sourcing of Symfony CLI is now official.

Announcing the open-sourcing of the Symfony CLI
https://symfony.com/blog/announcing-the-open-sourcing-of-the-symfony-cli

 
![featured item graphic](https://symfonystation.com/sites/default/files/inline-images/Featured-Item_1.png)

##Featured Item

We continue to highlight a post of the week. This one was an obvious and easy decision.

2021 was an incredibly hard year for many people and companies. The Symfony community was no exception, and our thoughts are with all of you who suffered because of the COVID-19 pandemic. Luckily, thanks to your help and support, there were some reasons for optimism throughout the year. This blog post highlights the main Symfony achievements during 2021.

Symfony 2021 Year in Review
https://symfony.com/blog/symfony-2021-year-in-review
 
 
###This week


Eelco Verbrugge reminds us that "Symfony is the fastest major PHP framework with the philosophy to start small and add features when you need them.

So today, I'll show you what is needed at a minimum to easily serve your new Symfony project. Bonuses are some packages which can be installed, and I think are useful to start with for developing."

Starting a new Symfony project on Linux 
https://dev.to/eelcoverbrugge/starting-a-new-symfony-project-on-linux-2amh

He also has:

My top 5 favorite Symfony packages
https://dev.to/eelcoverbrugge/my-top-5-favorite-symfony-packages-22i8


Jolie Code, @jolicode, explores how to how to use systemd properly to run Symfony Messenger workers.

Symfony Messenger 💛 systemd
https://jolicode.com/blog/symfony-messenger-systemd


Smaine Milianni explores how to:

Use PHP Enums as Doctrine type in Symfony
https://smaine-milianni.medium.com/use-php-enums-as-doctrine-type-in-symfony-85909aa0a19a


Speaking of Doctrine, Mike Zukowski explores the best way to:

Iterating billions of objects in Doctrine
https://medium.com/@dotcom.software/iterating-billions-of-objects-in-doctrine-23256f7d539

Who knew you could? ;)


2021 was an eventful year for the Drupal community. Explore all the highlights in the following article.

The Year in Review: Drupal in 2021
https://evolvingweb.ca/blog/year-review-drupal-2021

 
##Timeless


![Inspector logo](https://symfonystation.com/sites/default/files/inline-images/Horizontal-Inspector-Tagline-Logo_0.png)


_Sponsored Article_

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. 

Why You Should Use Code Execution Monitoring with Symfony
https://www.symfonystation.com/why-code-execution-monitoring-symfony
 

![php logo](https://symfonystation.com/sites/default/files/inline-images/php-logo_4.png)
 
 
##PHP
 
###ThisWeek


Dariusz Gafka, @DariuszGafka, shows us:

How To Build Maintainable PHP Applications
https://dariuszgafka.medium.com/how-to-build-maintainable-php-applications-29c48e2a258c


The following from Geni Jaho is specific to Laravel, but the general points apply to all PHP programming. 

A significant pain point in programming has to deal with all the clutter that is shoved into controller methods. One of the best ways to remedy that is to extract some functionality into their own classes. They’re called Actions, or Services, or whatever.

Refactoring #2: From controllers to actions
https://genijaho.medium.com/refactoring-2-from-controllers-to-actions-e4d448194abb


The Drinks & Co. engineering team is a fan of concurrency and parallelism to get the best performance and resource optimization in their systems.
Here, they explain how to start adding Async PHP to your toolkit.

How we are adding Async PHP to our Stack
https://uvinum.engineering/how-we-are-adding-async-php-to-our-stack-3bb7c2192cb


This article on Dev.to shows us a way to gain readability and efficiency in our foreach loops that go over a collection of objects: iterators.

PHP iterators and generators: get started with the `ArrayIterator` and `FilterIterator` classes
https://dev.to/yactouat/php-iterators-and-generators-get-started-with-the-arrayiterator-and-the-filteriterator-classes-39co


Samuel Fontebasso continues his series looking at "how to use Docker containers to run applications in a production environment."

PHP + Nginx with Docker in production
https://blog.fontebasso.com.br/php-nginx-with-docker-in-production-8c1ad71182f2


DEVRiMS says "There are many professionals in the software development field, but very few of them are real inspirations in the community. We are glad to feature Mr. Chris Hartjes in our first interview today."

PHP Interview with The Grumpy Programmer - Chris Hartjes
https://devrims.com/blog/grumpy-programmer-php-interview/


In Portuguese, Guilherme Donizetti writes "When we use the PHP language in our projects, in more or less time we will need to use some database as well. Databases are always a tool apart from what we are developing, but we want to connect the two things, and there are different ways to realize this connection. In this article, I will present PDO, a simple and efficient technique of connecting applications that use PHP to a database!"

PDO — CONEXÃO COM BANCO DE DADOS
https://guilhermedonizettiads.medium.com/pdo-conex%C3%A3o-com-banco-de-dados-5df0ac93f22f


The following series of Advent posts look at functional programming in PHP.

Advent of Functional PHP: Review
https://peakd.com/hive-168588/@crell/aoc2021-review


##Timeless
 

We ran across a promising tool this week. And it's building a Symfony integration. 

PSX: A modern set of PHP components to simplify API development
https://phpsx.org/


DeliciousBrains writes "You could just debug your PHP code using dump debugging functions such as error_log, print, and var_dump, and let’s be honest, we’ve all done it a lot! While helpful sometimes, they often just aren’t enough and can actually slow you down while developing. There must be a better way, surely?!

Enter Xdebug, the rather awesome step debugging and profiling tool for PHP."

How to Use Xdebug for Advanced PHP Debugging
https://deliciousbrains.com/xdebug-advanced-php-debugging/

You can also watch a video version

How to use Xdebug with PhpStorm
https://www.youtube.com/watch?v=1nryJL3kCx0

And by the way, don't host your videos on YouTube.


We found this bookmarkable article via Joshua Otwell's, @j21120, OpenLamp newsletter.

Buggy PHP Code: The 10 Most Common Mistakes PHP Developers Make
https://www.toptal.com/php/10-most-common-mistakes-php-programmers-make


![Code logo](https://symfonystation.com/sites/default/files/inline-images/code-logo_3.jpeg)


##Other
 

While there are many resources to help programmers write better code—such as books and static analyzers—there are few for writing better comments. While it's easy to measure the number of comments in a program, it's hard to measure the quality, and the two are not necessarily correlated. A bad comment is worse than no comment at all. Here are some rules to help you achieve a happy medium.

Best practices for writing code comments
https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/


With the dust settled in the wake of Elastic’s relicensing controversy, VentureBeat interviewed co-founder and CEO Shay Banon to get his take on why they made the license change; what impact — if any — it has had on business, and what being a “free and open” company (vs. “open source”) really means.

Elastic CEO reflects on Amazon spat, license switch, and the principles of open-source
https://venturebeat.com/2021/12/27/elastic-ceo-reflects-on-amazon-spat-license-switch-and-the-principles-of-open-source/


Venture Beat also explores:

How open-source is powering data sovereignty and digital autonomy
https://venturebeat.com/2021/12/29/how-open-source-is-powering-data-sovereignty-and-digital-autonomy/


Ingo Steinke writes: "Inspired by my article “Nothing New in 2022?”, I will share some thoughts about what to expect and not to expect of a new year from the perspective of a frontend web developer."

What not to expect from 2022 as a Web Developer
https://ingosteinke.medium.com/what-not-to-expect-from-2022-as-a-web-developer-55f095268d30


James Read states: "I propose that DockerHub as a single repository of container images is becoming less and less important than it once was, and in its place, GitHub is a strong contender to take over as the #1 repository for containers — as it has its sights on being everything a developer needs."

GitHub may replace DockerHub
https://levelup.gitconnected.com/github-may-replace-dockerhub-a5da5e547f01


Apoorv Tyagi published this informative article.

How to Scale a Distributed System
https://www.freecodecamp.org/news/how-to-scale-a-distributed-system/


Web3 is the latest Silicon Valley buzzword, which is being dubbed as the next phase of the Internet. It has got tech and cryptocurrency enthusiasts buzzing but others, Jack Dorsey in particular, argues it is already in the hands of deep-pocketed venture capitalists.

But what is Web3, and can this future vision of a decentralized and egalitarian Internet work?

What is Web3, and why is Jack Dorsey attacking the 'next phase of the internet'? 
https://www.euronews.com/next/2021/12/24/what-is-web3-is-it-the-new-phase-of-the-internet-and-why-are-elon-musk-and-jack-dorsey-aga


We all know nation-states aren't necessarily the best forces for an open, free, and democratic internet. Dr. Samantha Hoffman writes:

"Recent prominent data breach incidents, ... have made clear how vulnerable both public and private systems remain to espionage and cybercrime. What is less obvious is the way that a foreign adversary or competitor might target data that is less clearly relevant from a national security or espionage perspective. Today, data about public sentiments, such as the kinds of data used by advertisers to analyze consumer preferences, has become as strategically valuable as data about traditional military targets. As the definition of what is strategically valuable becomes increasingly blurred, the ability to identify and protect strategic data will be an increasingly complex and vital national security task."

How to avoid falling into China’s ‘data trap’
https://techcrunch.com/2021/12/26/how-to-avoid-falling-into-chinas-data-trap/


Brian Kardell ponders upon this "We’ve built the web so far on a very particular model, with web engine implementers at the center. The whole world is leaning extremely heavily on the independent, voluntary funding (and management and prioritization) of a very few steward organizations.

Maybe that isn’t a great idea."

Webrise
https://bkardell.com/blog/Webrise.html


Have you published or seen something related to Symfony or PHP that we missed? If so, please contact us.  https://www.symfonystation.com/contact


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 any of our site’s pages. https://www.symfonystation.com/contact Joining gets you each week's communique in your inbox (a day early). And [follow us on Twitter](https://twitter.com/symfonystation). 
 
 
###Once again, Happy New Year Symfonistas!


![Reuben Walker photo](https://symfonystation.com/sites/default/files/inline-images/Reuben_7.png) 
 
Reuben Walker
Founder [Symfony Station](https://www.symfonystation.com/)
 
Reuben is also Ringmaster of [Mobile Atom Media](https://media.mobileatom.net/about-us/) and its division [Mobile Atom Code](https://www.mobileatom.net/).