DEV Community

Cover image for Symfony Station Communiqué — 25 February 2022. A look at Symfony and PHP news!
Reuben Walker, Jr.
Reuben Walker, Jr.

Posted on • Updated on

Symfony Station Communiqué — 25 February 2022. A look at Symfony and PHP news!

This post originally appeared on Symfony Station. Explore our news communique archives for evergreen content. And please sign up for our newsletter to get the latest news communiques and original content delivered to your inbox.

Welcome to this week's Symfony Station Communiqué. It's your weekly review of the most essential news in the Symfony and PHP development communities. Take your time and enjoy the items most valuable for you.

Thanks to Javier Eguiluz and Symfony for sharing our last communiqué 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 logo

As always, we will start with the official news from Symfony.

Highlight -> “This week, Symfony introduced the Twig 3 certification and updated the official Symfony book to showcase Symfony 5.4 and 6.0 versions. In addition, SymfonyLive Paris 2022
conference announced more speakers and more workshops.”

A Week of Symfony #790 (14-20 February 2022)

SymfonyLive Paris, the French Symfony conference welcomes the latest conference speakers and their talks.

Last talks and speakers announced for SymfonyLive Paris 2022

They also announced that:

Symfony 6.1 will require PHP 8.1

Featured item image

Featured Post

Happily, we ran across this oldie-but-goodie. Sometimes wit works best. It will be your favorite read of the week.

Probably the greatest Medium post comment of all time.

Symfony

Jordi Bassaganas writes “a few more issues have been closed recently on the ChesslabLab organization on GitHub, this time on the Chess API repository. As you probably know, the PHP Symfony framework is being used to deploy a REST API with awesome features that chess web developers will absolutely love, and now you can download images and videos representing your favorite games.”

Symfony Examples of API Endpoints to Download Files

Sumit has this for us:

Autowiring in Symfony

Łukasz Chruściel writes “You might have already heard about it – Sylius v1.11 is live! The release comes with a long-expected feature – Catalog Promotions, but this is not all that has changed since the previous release. Also, the feature itself comes with a few details that you may be curious about. All these updates will be covered here.”

How we got to Sylius 1.11 release – a developer’s perspective

Andreas von Studnitz says, “In this blog post, I’d like to discuss some (recent Magento) announcements and address some misconceptions currently expressed by some members of the e-commerce community.”

Magento’s LTS version: The next step in the Magento life cycle

Mickaël Andrieu writes “je travaille sur un projet de segmentation de base clients pour la validation de mon titre d’Ingénieur Machine Learning et je fais bosser mes propres élèves en Master 2 Data Marketing sur la segmentation d’un site e-commerce développé sur PrestaShop.”

Faire du Machine Learning avec PHP ? Challenge accepted!

Webkul notes “In this blog, we are going to learn how to set up namespace and define services in Prestashop and also, how to get the service in a Symfony container.”

Creating Services in Prestashop 1.7

Looking to pull in a Spotify playlist? Here’s how.

How to Create a Connection to Spotify’s Web API Using Symfony

Dariusz Włodarczyk notes “Symfony form handler allows using different input types like TextTypeArrayChoiceListChoiceType etc. while using Array based type the result is an empty array. The only one working case is TextType but it still yields just raw json — but that’s undesired result.

After struggling for a while, the only working solution I’ve found is providing new input type (JsonType) and new DataTransformer.

Symfony Form — JsonType

Marco Pfeiffer says that “Finally use your multi-core CPU to run your tests multiple times faster, even with complex test setups.”

Improve PHPUnit Performance by Parallelization Using Liuggio-Fastest

In the first of a series, Guillaume examines whether to use a CMS or not. En francais.

CMS or not CMS?

He follows up with:

CMS in Symfony: what features?

Joomla announces that “in this article, Dimitris Grammatiko shares his insights and presents the definitive way to add images in Joomla 4 as well as how you can backport these advantages into older Joomla versions. Dimitris explains the history and usage of native support for lazy loading images and also with a new concept of adapters for storing images, both of which shipped in Joomla 4.0.5.

New image convention to help developers

Matt Glaman writes “This past weekend was at Florida Drupal Camp, and I gave a talk about using PHPStan to tighten up your Drupal codebase. For the past two years, the Drupal community has been leveraging PHPStan indirectly through the drupal-check and Upgrade Status modules to find usages of deprecated code as we journeyed from Drupal 8 to Drupal 9. This is barely the tip of the iceberg of what value PHPStan provides, but it had an immense impact.”

Tighten up your Drupal code using PHPStan

This was a great presentation. I’ll try to share all the Camp presentations once they are available.

Speaking of Drupal they need your help.

Help get us on track for an August 2022 release of Drupal 10.0.0!

This Month

Tomas Vortruba asks “How can we create 2 tests scenarios for the Symfony Kernel project with 2 different parameters? How can we inject 2 different instances of the same interface? How can we do it in the same way we already configure both of them?

Today we'll look at a little trick that allows us to create Symfony Kernel with different configs.”

How to Create Symfony Kernel for Tests with Different Configs

This Year

While researching for when we can finally have automatic core updates in Drupal I found this helpful post.

Drupal in 2022: How to Prepare for Drupal 10

Timeless

https://symfonystation.com/sites/default/files/inline-images/Horizontal-Inspector-Tagline-Logo_0.png

Sponsored Article

We published our second sponsored article on Symfony Station exploring how code-driven monitoring helps you deliver successful Symfony products. Like all our articles it is now available via audio.

How code-driven monitoring helps you deliver successful Symfony products

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.

https://symfonystation.com/sites/default/files/inline-images/php-logo_4.png

PHP

Simon Bisson says, “.NET is much more than Microsoft’s own tools and languages. The open source PeachPie brings PHP to the table.”

Run PHP on .NET with PeachPie

Eelco Verbrugge writes “Type hinting are type declarations to function arguments, return values and class properties. PHP ensures the value is of the same type you declared or throws an TypeError. It isn't required but very useful to catch mistakes and helpful to others reading your code to understand what is up.”

PHP Type Hinting

Azraar Azward has a solid review of SOLID for us. ;)

SOLID principles in a nutshell

And Roberto B. has this:

Using Collections package outside of Laravel

Frank de Jonge notes “Event-driven systems come in all sorts of shapes and sizes. The obvious commonality is they all use events to communicate information. These events come in many shapes and sizes and determining what goes into an event has an immense impact on the design of your system.

In this post, I'd like to go over three different types of events. I hope clarifying these types will allow you to have better discussions about event-driven architectures and integrations.”

The different types of events in event-driven systems

No CS Degrees shares “Chris and his partner bought their dream house after Chris learned PHP and became a developer. We talked through his motivations for learning PHP, the benefits of learning programming, and his tips for beginners.”

Why you should learn PHP - Chris shares his story of learning to code

Speaking of learning, sometimes you need a good reference. Julian Maury has you covered with an extensive new PHP 8 cheatsheet.

Another PHP 8 cheatsheet

Matthew Weier O'phinney shows us how to:

Getting OpenSwoole and the AWS SDK to Play Nice

In a recent project, Cees-Jan Kiewiet discovered that “A feature that we really needed to make our fiber integration complete is the cancellation of them. Or to be more precise, the cancellation of any awaited promise yielding operations in that fiber and as a consequence the fiber that those are awaited in. This post goes into detail on how different cancelation scenarios work for the PR introducing it and was originally part of that PR's documentation but was replaced by a simpler section.”

Cancelling ReactPHP fibers

Paul Ducklin writes “If you’re using PHP in your network, check that you’re using the latest version, currently 8.1.3.

Released [2022-02-17], this version fixes various memory mismanagement bugs, including CVE-2021-21708, which is a use-after-free blunder in a function called php_filter_float().

(Versions 8.0 and 7.4 are still supported, and are vulnerable too; if you aren’t using the latest 8.1 flavor of PHP then you need 8.0.16 and 7.4.28 respectively.)

PHP fixes security flaw in input validation code

The third build of the Early Access Program for PhpStorm 2022.1 is now available!

PhpStorm 2022.1 EAP #3: Enhanced Array Shapes

This post explores WordPress in particular but has excellent ideas for any website creation platform.

Standardized Design Tokens and CSS for a consistent, customizable, and interoperable WordPress future

https://symfonystation.com/sites/default/files/inline-images/code-logo_3.jpeg

Other

The NewStack writes “Can real-world programming problems be solved with state-of-the-art AI? This month DeepMind explored that question, confronting the world with a fresh perspective on programming, and on the capabilities and limits of artificial intelligence.”

When DeepMind’s ‘AlphaCode’ Competed Against Human Programmers

Derrick Harris notes “Try as they may, critics of SQL (syntax query language) have never really been able to dent its popularity. Decades after its creation, the majority of the world’s databases still run on SQL, and the majority of data analysis still happens via SQL queries. It’s not too big a stretch to say that the digital world runs on SQL.

Why SQL Needs Software Libraries

Kinsta compares HTML and XML.

XML vs HTML: Learn the Difference Between These Markup Languages

Germano says, “When developing real-time web applications, WebSockets might be the first thing that comes to your mind. However, Server-Sent Events (SSE) are a simpler alternative that is often superior.”

Server-Sent Events: the alternative to WebSockets you should be using

Mark Nottingham writes “The orange site is currently discussing an article about Server-Sent Events, especially as compared with WebSockets (and the emerging WebTransport). Both the article and discussion are well-informed, but I think they miss out on one aspect that has fairly deep implications.”

Server-Sent Events, WebSockets, and HTTP

Finally, “in an era of talent shortages and fast delivery, the low-code market is taking off. Citizen development on a low-code platform may be the solution to organization’s internal needs.” Brian Bates asks:

Is the Citizen Developer the New Face of Agility?

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.

Do you own or work for an organization that would be interested in our promotion opportunities? If so, please contact us. We’re in our infancy so it’s extra economical. ;)

Happy Coding Symfonistas!

AUTHOR

Reuben Walker

Founder
Symfony Station

Latest comments (2)

Collapse
 
robertobutti profile image
Roberto B.

Thank you @reubenwalker64 for sharing the post about "Using Collections package outside of Laravel"

Collapse
 
reubenwalker64 profile image
Reuben Walker, Jr.

Anytime. Keep up the good work!