Symfony Station Communique - 31 December 2021. A Look at Symfony and PHP News.

This post originally appeared on Symfony Station.

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 in their Week of Symfony.

*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)

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

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

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.

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."

He also has:

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

Smaine Milianni explores how to:

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

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

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://symfonystation.com/why-code-execution-monitoring-symfony

PHP

ThisWeek

Dariusz Gafka, @DariuszGafka, shows us:

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.

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.

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."

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!"

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

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

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.

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:

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."

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."

Apoorv Tyagi published this informative article.

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?

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."

Have you published or seen something related to Symfony or PHP that we missed? If so, please contact us. https://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://symfonystation.com/contact Joining gets you each week's communique in your inbox (a day early). And follow us on Twitter.

Once again, Happy New Year Symfonistas!

Reuben Walker
Founder Symfony Station

Reuben is also Ringmaster of Mobile Atom Media and its division Mobile Atom Code.

22