Sorry, you need to enable JavaScript to visit this website.
Skip to main content

Symfony Station Communiqué - 1 April 2022

A white paragraph.

 


 

Symfony Station Logo

symfony logo

 

 


 

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.

Again, we cover tech aspects of the war crimes going on in Ukraine and how you can help.

Take your time and enjoy the items most valuable to 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 will be in bold.

 

Symfony

 

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

Highlight -> “This week, Symfony development activity focused on fixing bugs, especially on the HttpClient component, and polishing the new features of the upcoming Symfony 6.1 version, such as the new local switcher. Meanwhile, SymfonyLive Paris 2022 conference is coming in just two weeks and SymfonyCon Disneyland Paris 2022 conference announced the last days of its early-bird discounts.

A Week of Symfony #795 (21-27 March 2022)

 

They also say:

See you next week at SymfonyLive Paris 2022 conference

 

SymfonyCasts continues their free look at Symfony 6 and the Easy Admin paid courses.

This week on SymfonyCasts

 

Platform.sh announced:

We’re changing the way development environment URLs are generated

 

Featured Item

 

Feature Item graphic

 

Thoughtworks notes a lack of thought by some. “We don't see teams making that trade-off analysis, blindly accepting the complexity of SPAs by default even when the business needs don't justify it. Indeed, we've started to notice that many newer developers aren't even aware of an alternative approach, as they've spent their entire career in a framework like React. We believe that many websites will benefit from the simplicity of server-side logic, and we're encouraged by techniques like Hotwire that help close the gap on user experience.”

 

SPA by default

 

Symfony and StimulusUX people.

 

This Week

 

I know I’ve shared many of these, but this one is in Spanish.

Laravel vs Symfony, ¿cuál elegir?

 

Les-Tilleuls.coop says in French, “we're fond of DDD tactical patterns! In this structural approach, we must divide and prioritize our code into three main layers: Infrastructure, Domain & Application. However, the same idea can be expressed and defined in several areas, for example, if I design a forum module as well as a real-time discussion module. In both domains, I will have a public template whose class is named 'Message', each using its own namespace: 'App\Domain\Forum\Model\Message' and 'App\Domain\Chat\Model\Message'.”

How do I make resources with the same name coexist from two different domains with API Platform?

 

Bernard NG thinks “it is preferable to use XML mapping when doing DDD.”

DDD With Symfony : How to configure Doctrine XML Mapping

 

Matthias Noback had a different take back in May of 2020.

DDD and your database

 

Michał Romańczuk has a very detailed case study of converting a nightmare legacy project to Symfony by using the Strangler Pattern.

Strangler Pattern in practice

 

Hatem Ben Yacoub has a review of a TYPO3 handbook.

The TYPO3 Guidebook reviewed. Understand and Use TYPO3 CMS.

 

You can learn more about Symfony-based CMSs like TYPO3 and Drupal here.

 

Specbee writes “Data. Files. They’re what make up your website. And how you store and serve them can make all the difference for user experience. Obviously, cloud storage has changed the way we look at and manage data. Today, we’re going to walk through one of the more popular options for Drupal websites. S3 (Simple Storage Service) is the cloud storage service provided by AWS (Amazon Web Services) and it has been providing durable, secure, and scalable cloud storage for many industries.”

How to store and serve files from Amazon S3 on your Drupal website

 

Louis Nagtegaal shows us how to handle:

Drupal Migrations in ddev

 

Timeless

Inspector logo

Sponsored Article

 

We published our third sponsored article on Symfony Station exploring how to Implement Code Execution Monitoring for your Symfony apps via Inspector. Like all our articles it is now available via audio.

 

How to Implement Code Execution Monitoring for your Symfony apps via Inspector

 

All sponsored articles are for products we have vetted and stand behind. We either use them or would do so if they applied to the Symfony Station site.

 

PHP logo

PHP

 

This week

 

The PHP Foundation published its March Newsletter.

PHP Foundation Newsletter

 

And PHP Architect published its April Issue.

php[architect] April 2022

 

Jonathan Bossenger writes “Ever since I discovered how to configure PhpStorm with Xdebug for debugging, it’s been my go-to solution for hunting down difficult to reproduce bugs. What I didn’t know until very recently was that it’s also possible to debug JavaScript using the same setup, which blew my mind!”

Debugging React, JavaScript, and PHP at the Same Time With PhpStorm

 

Bobby Jack notes “Bitmasks are as old as computing itself and, admittedly, were more useful in the days of memory scarcity and low-level programming. But there’s nothing to stop you from using them today, when appropriate. PHP makes use of bitmasks in many of its built-in functions.”

How to use bitmasks in PHP

 

Amplitudo asks:

Why are we using sessions in PHP?

 

Italo Baeza Cabrera writes “PHPUnit is a very complete testing suite, and with Mockery is even better. Most of the assertions are covered: data in arrays, strings inside strings, classes instances, and so on. Even so, PHPUnit is not perfect, and for your project, you may need a “custom” assertion. For example, I just stumbled upon the need to create a simple assertion to check if a class extending other contains a given variable set of methods.”

PHPUnit: Making your own assertion

 

Thomas Dutrion says, “Things in computing science are sometimes complex… And I consider myself a fervent proponent of self-descriptive code to limit complexity. I won’t get back on why you should unit test at least some of your code, nor will I spend time teaching how to write unit tests in this article. I will consider that all of you are ok with these concepts and implementations. Examples will be based on a PHPUnit implementation.”

Unit tests and data providers, the readable way

 

Code and Deploy shows us how to:

Sanitize Input using PHP

 

Hicham Ben Kachoud has a quick look at the S in SOLID programming.

SRP: Single Responsibility Principle

He also examines the L.

LSP: Liskov Substitution Principle

 

And regarding SOLID’s D, Guy Erez explains:

Dependency Inversion vs. Dependency Injection

This is very useful.

 

Joseph Bielawski has “A short explanation of the Bus Factor and how to hold its score at safe levels.”

What happens if your development team is hit by a bus?

 

Last Week

 

Dimitrios Lytras says, “While I wasn't paying attention, PHP got quite good.”

Modern PHP

 

Brent writes “Generics in PHP. I know I’d want them. And I know a lot of developers who agree. On the other hand, there is a group of PHP programmers, maybe even larger, that say they don’t know what generics are, or why they should care. I’m going to do a series on this blog about generics and PHP. We’ll start from the beginning, but quickly work our way to the more complex topics. We’ll talk about what generics are, why PHP doesn’t support them, and what’s possible in the future.”

Generics in PHP: The basics

 

Golems notes “What does $this mean in PHP and similar questions are increasingly appearing on the Internet. StackOverflow is also bombarded with questions about this variable. Let's find out everything related to dynamic PHP access object property with $this and break it down with examples.”

Dynamically Access PHP Object Properties with $This

 

If you ever need an extensive PHP explainer article to share, Visualwebz has you covered.

A Bit About PHP

Code logo

Other

 

Please visit our Support Ukraine page to learn how you can help kick Russia out of Ukraine (eventually).

 

The cyber response to Russia’s War Crimes

 

The Next Web reports “For weeks, Russia’s military assault on Ukraine has been complemented by full-fledged information warfare. The Kremlin has propagandized Russian state media, and is trying to control the narrative online too. We’ve seen a bombardment of “imposter content” circulating – including fake news reports and deep-fake videos – while Ukrainians and the rest of the world have scrambled to find ways to tell the real story of the invasion. The instant messaging app Telegram has surfaced as one of the most important channels through which to do so. But what is it about Telegram that has millions flocking to it amid the chaos?”

Why Ukrainians are turning to Telegram during the war

 

The New Zealand Herald reports “Ukraine has claimed to have uncovered the identities of more than 600 Russian spies in what has been described as a significant blow to President Vladimir Putin's espionage efforts. Officials in the war-torn country allege the unmasked individuals were carrying out "criminal" activity across Europe. The Main Intelligence Directorate of Ukraine released a slew of personal details of hundreds of alleged agents working for the FSB.”

600 Russian spies busted in huge blow to Moscow's espionage war

 

Daniel Johnson reveals:

The real reason Ukraine's information war is so successful

 

This was long overdue.

Kaspersky Named First Russian Company on Security Risk List

 

The Washington Post writes “As the U.S.-funded broadcaster is forced to shut most of its Russian operations, its Web traffic indicates that Russian people are eagerly consuming its stories.”

The Kremlin tries to stifle Radio Free Europe — and its audience surges

 

Lawfare.org reports “Companies like Meta, Google, Apple, Microsoft, Twitter and even TikTok increasingly recognize that they cannot afford to sit geopolitical crises out. The war in Ukraine is the most dramatic instance yet of platforms’ geopolitical turn—their growing engagement with security and geopolitical challenges incidental to their business operations. Platforms came a lot more prepared for the war in Ukraine compared to previous major geopolitical inflection points. They have coordinated their actions with Western governments and other international actors leading the charge against Russia.”

Platforms at War

 

The Evil Empire Strikes Back

 

Russian hackers appear to be more competent than their generals and soldiers.

Russian military reportedly hacked into European satellites at start of Ukraine war

 

ZDNet reports that:

Multiple hacking groups are using the war in Ukraine as a lure in phishing attempts

 

The Intercept reports “Internal chat logs leaked from the notorious Russian ransomware gang Conti reveal unfiltered conversations between ultranationalist hackers in which they repeat Russian President Vladimir Putin’s conspiratorial lies about Ukraine, discuss the impact of early Western sanctions against their country, and make antisemitic comments about Ukraine’s Jewish president.”

Leaked Chats Show Russian Ransomware Gang Discussing Putin’s Invasion of Ukraine

 

Cybersecurity

 

Richard Forno writes “I and other researchers at the University of Maryland, Baltimore County have studied the cybersecurity preparedness of the United States over 90,000 local government entities. As part of our analysis, working with the International City/County Management Association, we polled local government chief security officers about their cybersecurity preparedness. The results are both expected and alarming.”

Hackers are targeting US local governments — and it’s time to fight back

 

Michael Usiagwu shares “The recent increase in the severity and sophistication of cyberattacks in recent years may just signal an essential, albeit overdue, turning point in cybersecurity. The clamor by security practitioners concerning the securing of cloud technology by use of technology like Zero Trust by enterprises and organizations has never been louder, and it’s not hard to see why.”

Zero Trust — The Silver Lining to Cloud Cyber Attacks

 

GitHub notes “Securing your projects is no easy task, but end-to-end supply chain security is more top of mind than ever. We’ve seen bad actors expand their focus to taking over user accounts, commonly used dependencies, and also build systems. Defending against these attacks is hard because there’s no one thing you can do to protect your project end-to-end.

To help you defend against these attacks, we created new guides in our Docs that cover how to get started securing your end-to-end supply chain.”

How to secure your end-to-end supply chain on GitHub

 

More

 

Rachel Lawson @rachel_norfolk says on Twitter, “If you are mining bitcoin in Europe then you are using up energy that could otherwise be heating people’s homes. You are directly helping Putin’s invasion of Ukraine by making it harder to apply sanctions on energy coming from Russia.”

 

On a related note, The Guardian reports a “campaign, called Change the Code Not the Climate and coordinated by Environmental Working Group is calling on bitcoin to change the way bitcoins are mined in order to tackle its outsized carbon footprint. The software code that bitcoin uses – known as “proof of work” – requires the use of massive computer arrays to validate and secure transactions. Rival cryptocurrency Etherium is shifting to another system – “proof of stake” – that it believes will reduce its energy use by 99%.

Climate groups say a change in coding can reduce bitcoin energy consumption by 99%

 

Wired opines “A string of “sabotage” incidents in open source software is reigniting discussions of how to safeguard projects that underpin digital platforms and networks around the world. Many of the recent incidents have been dubbed “protestware” because they relate to open source developers making code changes to express support for Ukraine amidst Russia's invasion and ongoing attack of the country.”

The Fragile Open Source Ecosystem Isn’t Ready for ‘Protestware’

 

Docker announced Extensions.

Docker Extensions Preview

 

GitHub shows us how to:

Save time with partial re-runs in GitHub Actions

 

They also announced CoPilot Labs. A VS Code extension for experimental applications of Copilot.

GitHub Copilot Labs

 

Jonas Ulrich writes “We're still wasting massive amounts of valuable development cycles in the frontend world by working in silos, or by to at least some extent reinventing the wheel for every project. Results suffer in the process, impacting real-world results for users and content creators alike. How did we get here, and what could a way forward look like? How we've already come a long way, and why still (so far) even Jamstack hasn't been the sole answer, either...”

Unlocking the frontend - a call for standardizing component APIs pt.1

 

UX Tools notes “The term “user error” implies that it’s the user’s fault when they do something wrong. But in the vast majority of cases, the fault actually rests with the designer for having created an interface that is confusing or makes it too easy for the user to make a mistake. The solution to user errors is not to blame the user or try to train the mistakes out of them. The solution is to redesign the product in such a way that it prevents errors from occurring in the first place.’

How Designers Can Prevent User Errors

 

Louis Lazarus says, “there is a whole bunch of lesser-used attributes that I was sure I’d forgotten about, and probably a whole bunch of attributes I didn’t even know existed. This post is the result of my research, and I hope you’ll find some of these useful to you, as you build HTML pages in the coming months.”

Those HTML Attributes You Never Use

 

That's it for this week. Thanks for making it to the end of another edition. I look forward to sharing next week's Symfony and PHP news with you on Friday.

Please share this post. :) Also, 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. ;)

More importantly, if you are a Ukrainian company with coding-related products, we can provide you with free promotion on our Support Ukraine page. Or if you know of one, get in touch.

Keep going Symfonistas!

 

Visit our Communiqué Library

You can find a vast array of curated evergreen content.

 

Author

Reuben Walker photo

 

Reuben Walker

Founder
Symfony Station

 

 

 


 

Symfony Station Communiqué - 11 March 2022

A white paragraph.

 


 

Symfony Station Logo

symfony logo

 

 


 

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.

This week, we continue our coverage of the war crimes going on in Ukraine and how you can help. That sparks some cybersecurity coverage as well. There was not much Symfony news so I’m adding in extra Drupal coverage that overlaps with Symfony development.

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 will be in bold.

 

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

Highlight -> “This week, Symfony 4.4.39, 5.4.6, and 6.0.6 maintenance versions were released. In addition, the entire schedule of the SymfonyLive Paris 2022 conference was published. Finally, Symfony expressed its solidarity with Ukrainian people.”

A Week of Symfony #792 (28 February - 6 March 2022)

 

They also remind us that “the French SymfonyLive conference organized in Paris will be soon here! Join us on April 7th and 8th for 2 days of Symfony talks. Regular pricing ends on March 14th!”

Only 4 weeks left before SymfonyLive Paris 2022

 

SymfonyCasts continues its exploration of EasyAdmin.

This week on SymfonyCasts

 

Featured Item

 

Featured Item graphic

 

A recent Forbes article notes “over one-quarter of U.S. consumers have not taken any steps to protect their digital/online privacy - and that means it is more important than ever for organizations to ensure their software and applications are as bulletproof as possible against bad actors. However, the rapid shift to digital and the fast-paced nature of business in today’s post-pandemic world, coupled with the growing and sophisticated threat landscape, continues to challenge even the most advanced security teams.

Something needs to change, and one company is arguing that the industry requires a new approach to security centered on developers. After all, developers have become the lifeblood of an organization's digital transformation journey - but the faster developers move to bring new applications to market, the greater the chances for flaws or security issues within their code.”

Why the Future of Cybersecurity Rests in Developers’ Hands

 

I wholeheartedly agree with this.

 

This Week

 

Alexandre DuBois asks "is Symfony using some sort of magic to validate inputs?"

Symfony Internals #2: Data Validation

 

Dans français Guillaume Ponty explores 3rd-party authentication with Symfony.

Symfony 6: S’authentifier Avec Google, Facebook, GitHub, …

 

Heddi Nabbisen has this interesting tutorial for us:

EasyAdmin 4 for admin panel based on PHP 8 and Symfony 6: Install and create a sample

 

Andy Blum writes “Following Drupal 8’s ambitious overhaul to “get off the island,” the recommended way to create a new Drupal site is to use composer to manage all PHP dependencies. By now, most Drupal developers will have had a chance to install a new module or update existing modules using composer’s require or update commands, but did you know that you can also use composer to run scripts to interact with your code?”

Add a Composer Script to Your Module or Theme

 

Griffin Polonus writes “PHP 8 includes improvements that show a clear desire to modernize, as well as capabilities of other popular languages that developers will appreciate. Thanks to PHP 8, Drupal 10 can now use tools that will enable continued growth and enhanced performance. Upgrading to PHP 8 will be beneficial to any site running on PHP–however, as a Drupal developer, I’m particularly excited about how this will impact Drupal 10. I’ll highlight some of the benefits that apply to many sites, but especially how it may apply to Drupal.

PHP 7 to 8: Entering the Modern Era of Programming Languages

 

Golems states, “Drush (the Drupal Shell) is one of the most convenient and functional assistants for all Drupal developers. Read on if you're interested in learning how Drupal 9 and Drush work together, what benefits it has, and how easy it is to sanitize data with Drush.”

Drupal 9: Sanitizing Data With Drush

 

Last Month

 

Manish Saharan says, “In this article, we’re going to discuss two such Drupal 8/9 utility tools that have massively simplified and improved the way you work with Drupal code, modules, and installations - Drupal Console (leveraging Symfony Console) and Drush.”

Accelerating Drupal Development with Drupal Console and Drush

 

Timeless

 

As we noted in How Symfony Station was built: an adventurous exploration of layout solutions, the default Drupal admin theme is an eye-destroying abomination. We wrote “Gin is beautiful in comparison. It's clean, cool, and collected with some customization options.” It was built on the foundation of Claro from one of the lead designers of the Claro & Drupal Design System.

Clayton Dewey expounds upon this with, “I’ve seen, time and again, the difference a clean and modern website editing interface can have on both the quantity and quality of site content. When a website’s back-end is frustrating and unappealing to work with, it dissuades the author from posting.” In a multi-post series, he explores the wonders of Gin.

There are a lot of design lessons to pick up in the series. And if you’re a new Drupal user, lessons on how to use it. It’s perfect for larger publishers.

Enhance Your Drupal Website’s Authoring Experience Part 1 - Modernize the Admin Theme with Gin

 

Enhance Your Drupal Website's Authoring Experience Part 2 - Declutter the User Interface

 

Enhance Your Drupal Website’s Authoring Experience Part 3 - Improve the Field User Interface

 

Enhance Your Drupal Website’s Authoring Experience Part 4 - Fine Tune Admin Pages

 

Enhance Your Drupal Website's Authoring Experience Part 5 - Accessibility Tools and Conclusion

 

Note: Drupal is addressing their usability problem with a version of Claro that will be non-experimental for core in v. 10.

 

Inspector logo

Sponsored Article

We published our third sponsored article on Symfony Station exploring how to Implement Code Execution Monitoring for your Symfony apps via Inspector. Like all our articles it is now available via audio.

 

How to Implement Code Execution Monitoring for your Symfony apps via Inspector

 

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.

 

PHP logo

PHP

 

This week

 

Rafael Bernard Araujo explores Domain-Driven Design in and value object:

Introducing value objects in PHP

 

Tomasz Dobrowolski covers dependency injection and writes, “while it sounds complex, it’s not as scary as it sounds on the surface. And if used correctly, it can transform your code to be cleaner and easier to work with.”

What Is Dependency Injection in PHP and How You Can Use It to Write Better Code

 

Marco Aurélio Deleu says, “I have been working on a new Runtime for Bref for a while now and it has been my biggest open source journey so far. It has been incredibly challenging and a great learning experience. In this post, I want to run through some key aspects that I faced while working on this.”

3 things I learned working on a Bref Runtime

 

Frank de Jonge shows us how to:

Use a message envelope

 

Andreas Heigl takes a look at PHP attributes.

Attributes are awesome

 

Harpreet Kaur notes “Memcache is object storing mechanism which is used to store the results of database queries helping websites to serve pages faster. Memcaching process stores data as key-value pairs in memory so that it can be accessed later. It will be useful in those applications which rely heavily on database queries. Memcaching is going to improve the performance of the application significantly.”

What is Memcache & How to use it in PHP?

 

Ten7 looks at Memcache in Drupal.

Memcache Testing and Proxying

 

Gene Wilburn needed to build a lightweight search functionality. He writes “As I thought about a solution for this small site, I thought of grep, the open-source search utility with a long Unix heritage that can rip through text files to search for words or phrases and show them in context.”

Greppy: A Lightweight Perl/PHP Website Search Engine Based on Grep

 

Jakub Misek says, “Have you heard about the Visual Studio Code for the Web? It's the code editor running in your browser, allowing you to work with your local files, files on your GitHub repositories, or files on Azure. Anywhere.

In the case of the PHP language, it is only suitable for quick edits on small projects, due to its limitations. However, PHP Tools for Visual Studio Code is newly available for VS Code for the Web. All the editor features can now be used in this browser-based development environment.”

PHP IntelliSense on the Web

 

Last Month

 

Alessandro Castellano has a new tutorial and says, “you are going to see how class constructors work in PHP, what happens with class inheritance, and a new PHP 8 feature called “argument promotion”.”

PHP Constructors Explained

 

WPGraphQL notes “Setting up End to End tests for WordPress plugins can be done in several ways (Codeception, Cypress, Ghost Inspector, etc), but lately, the easiest way I’ve found to do this is to use the @wordpress/env and @wordpress/scripts packages, distributed by the team working on the WordPress Block Editor (a.k.a. Gutenberg), along with GitHub Actions.”

Adding End 2 End Tests to WordPress plugins using wp-env and wp-scripts

 

Frank Pins explores Gitlab pipelines in a series of articles.

Optimizing Gitlab pipelines - Basics (1)

 

Optimizing Gitlab pipelines - PHPUnit (2)

Code logo

Other

 

Please visit our Support Ukraine page to learn how you can help kick Russia out of Ukraine (eventually).

I think we should all stop doing business with Russian companies. However, many think internet access is an exception. At this point, I am not sure. But Cloudflare is.

Cloudflare won’t cut off Russia, says it “needs more Internet access, not less”

 

It seems that Twitter itself agrees as it has created an onion site for Tor browsers.

Learn more in this Tweet thread

 

And Lumen does not.

Breaking Russia's internet backbone

 

Venture Beat has a report on the Ukrainian IT Army’s offensive.

Ukraine’s IT army is doing well, hitting Russia with ‘cost and chaos’

 

Anonymous continues its assault on Putin’s minions and lackeys.

Anonymous claims it hacked into Russian TVs and showed the true devastation of Putin’s Ukraine invasion

 

Cyber Scoop reports “NATO nations voted unanimously last Friday to admit Ukraine to their Cooperative Cyber Defence Centre of Excellence (CCDCOE), a development which experts said will help Ukraine fight off mounting cyber threats from Russia.”

Ukraine, looking to fortify itself against Russian attacks, admitted to NATO cyber center

 

The free world also needs to kick up its defensive game. Three companies are aiding the effort.

Cloudflare, CrowdStrike, and Ping Identity launch the Critical Infrastructure Defense Project

 

What won’t work is the Ostrich approach.

It's time to stop hoping that cybersecurity problems will just go away

 

One way to defend your site is to block access to it by country. If you don’t have an audience in Russia, you should do so. We do so we aren’t.

How to block access to your website and related services in Russia, PHP 8, and client-side alternatives

 

Tawhid has this security advice for us:

11 Security tips to protect your website

 

As an example of an attack, Nevulo explains XSS. “Cross-site scripting is an attack performed on websites, where an attacker can inject some malicious code or scripts that get executed to modify the behavior of that website.”

What is cross-site scripting (XSS) and how does it work?

 

Harvard Business Review’s Stuart Madnick takes a peek at where this might all lead.

What Russia’s Ongoing Cyberattacks in Ukraine Suggest About the Future of Cyber Warfare

 

Via Fast Company “MacPaw’s Julia Petryk talks about sheltering in an underground parking garage, enduring Russian propaganda, and confronting the emotional toll of the war.” MacPaw is a Ukrainian company we urge you to support.

 

What it’s like to work at a Ukraine tech company during Russia’s invasion

 

Speaking of tech companies:

It took a war for Big Tech to take a side

 

Here are a few articles examining why Putin’s war of terror is not going so well (aside from the fact that most thugs are corrupt, dumb, and incompetent).

Putin Underestimated the Connective Tissue of Capitalism

 

The Strategy That Can Defeat Putin

 

The Spectacular Collapse of Putin’s Disinformation Machinery

 

And now in more encouraging news, here’s a look at the impressive things coming to CSS. Michelle Barker writes “It’s fair to say that we’re in a booming era for CSS right now. As I write this, I notice that many of these new features have some things in common. Yes, they often help us write better, cleaner, and more efficient code.”

New CSS Features In 2022

 

Icons are always useful for UI, UX, and web design. Here’s how to use Font Awesome no matter your dev/design stack.

Now You Can Stop Shoehorning Solutions to Get Icons Working with Your Tech — Font Awesome Matches Your Tool Stack

 

Microsoft made an announcement that will make JavaScript developers happy.

A Proposal for Type Syntax in JavaScript

 

Writing for Forbes, Amir Husain says:

Decentralization Is the Future of Software

 

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. ;)

 

More importantly, if you are a Ukrainian company with coding-related products, we can provide you with free promotion on our Support Ukraine page. Or if you know of one, get in touch.

 

Keep going Symfonistas!

 

Visit our Communiqué Library

You can find a vast array of curated evergreen content.

 

Author

Reuben Walker photo

 

Reuben Walker

Founder
Symfony Station

 

 

 


 

Symfony Station Communiqué - 21 January 2022

 


 

 


 

Symfony Station Logo

symfony logo

 

 


 

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é and newest article 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 fixed some issues related to PHP enums and improved the performance when using many environment variables in your application. Meanwhile, the SymfonyWorld Online 2022 Summer Edition conference finished its early bird period, but the Call for Papers is still open, so you can send your proposals until February 14, 2022."

A Week of Symfony #785 (10-16 January 2022)

 

Symfony announced "we're introducing the new certification exam for Symfony 6. This exam is similar to the existing Symfony certification exams (same exam topics, same number of questions, etc.) but we've revamped the certification contents with many new questions in addition to removing outdated or complicated questions. We've also updated the content so the entire certification exam for Symfony 6 is much easier than before. No trick questions, the entire exam has been redesigned making sure all questions will be easy to understand and easy to answer to."

Introducing the Symfony 6 Certification

 

They introduced the brand new Webapp pack. "What are the benefits? The main benefit is that a pack is a regular Composer package that you can require in any existing project (even late in the game). That allows to compose your application by using more than one pack. As for code, package composition is almost always better than inheritance. The website skeleton is all about inheritance: philosophically, it extends the base skeleton. You need to use one or the other. On the contrary, the Webapp pack can be included in any set of dependencies, independently of the skeleton that was used to create the project. Think of a pack as being the equivalent of a PHP trait."

A better way to quickly start Symfony projects

 

Featured Item graphic

 

Featured Item

 

Symfony Flex makes it easy to install a package and get everything you need to start working immediately: new config files, changes to .env, Docker configuration and more. The idea is so powerful that symfony/skeleton - the repository used for new Symfony apps - starts empty other than composer.json! Familiar files like src/Kernel.php, bin/console and config/services.yaml are added to your project via recipes.

Starting in symfony/flex 1.18.0 or 2.1.0, a new composer command is now available when you need to update Symfony to a new version: recipes:update. This command is smart: it generates a "diff" between the originally-installed version of recipe and the latest version, then leverages git to apply that patch. In other words, upgrading recipes is as simple and robust as merging two branches together with git! Most of the time the changes apply cleanly. But if they don't, you get a familiar git-style conflict that you can resolve.

Fast, Smart Flex Recipe Upgrades with recipes:update

 

This Week

 

Akashic Seer is back with another entertaining article.

Symfony how to get query string values sent by AJAX calls

 

Oliver de Cramer writes "For over 7 years I have mostly worked on e-commerce projects. Most of them were Magento 1 & 2 projects with a few adventures with other solutions (Drupal commerce 😱).

So when beginning of this summer I was given the opportunity to work on a Sylius project that didn’t sell products, but subscriptions I jumped on the occasion. "

A Little Sylius Adventure: From the perspective of a Magento developer

 

Speaking of Sylius, Les-Tilleuls.coop has a case study carried out with one of its customers, Rapid-flyer.com.

They say "in this article, we go to meet Nicolas Mathieu, CEO of this company founded almost 20 years ago, who looks back on the different technical choices that led to our collaboration and the current development of this e-commerce project. "

Case Study: Rapid-flyer.com x Les-Tilleuls.coop (en francais)

 

PrestaConcept presents "a simple and elegant solution, using the injection of tagged services, to give you the possibility to disable certain listeners when executing certain commands."

How to Disable Certain Listeners during Certain Commands in Symfony (aussi en Francais)

 

EasyAdmin 4.0.2 has been released, and it includes one of the most requested features by the community: menu badges. These badges are commonly used to display some numeric value next to menu items (e.g. number of notifications, number of new clients, number of invoices pending to be paid, etc.)

New in EasyAdmin 4: Menu Badges

 

Kévin Dunglas says "version 3 of the popular Doctrine DBAL library has been released at the end of 2020, almost 10 years after the initial release of version 2. In September 2021, Doctrine ORM 2.10 added support for DBAL 3, while still supporting DBAL 2 at the same time.

The upgrade process from DBAL 2 to DBAL 3 is usually straightforward. Most breaking changes impact low-level classes, that aren’t commonly directly manipulated when using the ORM. However, things become more complex if you rely on JSON columns, and you may know that I’m a big user of them!"

JSON Columns and Doctrine DBAL 3 Upgrade

 

Luismi Sánchez shares his Tips and notes from a SymfonyCast.

Symfony fundamentals notes

 

Damian Brdej writes "Laradock is a full PHP development environment for Docker. It contains a variety of popular services such as PostgreSQL, MySQL, Redis, MongoDB, PHPmyAdmin, and so on."

Laradock - a ready to use PHP docker environment

 

Oleg Charnyshevich tells us "one part of my job is a code review, and I started to notice that some of my colleagues can’t get an idea of dependency injection and the service container. As a result, they tend to over-engineering things." He continues with this.

4 ways to inject dependencies in Symfony that you probably don’t know about

 

Youri Galescot says "some time ago I discovered the TailwindCSS framework created by Adam Wathan and I was seduced by its simplicity and speed of use. My productivity in creating user interfaces and HTML/CSS integration has been really boosted."

How to integrate TailwindCSS v3 into a Symfony project with Webpack Encore (en francais)

 

PHPStan is being added to core for the Drupal 10 update later this year.

The static analyzer tool PHPStan has been added to Drupal Core

 

For those of you using Drupal for your site, this looks like a useful module.

Personalizing the Website Experience for Visitors Using the Drupal 9 Smart Content Module

 

Finally on the Drupal front, Daniel Sipos writes that in December "the 9.3.0 minor version of Drupal was released, containing, like usual, some progressive enhancements to the overall product. Among these, I would like to highlight today two such changes pertaining the permissions system. So let’s get to it."

Permissions updates in Drupal 9.3

 

Matija Cerovec writes "The strategy design pattern is a behavioral software design pattern that lets you define a family of algorithms, encapsulates them, and selects one from the pool for use during runtime. The algorithms are mutually interchangeable. By using design patterns, you can make your code more flexible, reusable, and maintainable. In this blog, I will show how to use strategy design pattern on Symfony by real-world case."

Implementing Strategy Pattern with Symfony

 

Jérôme Tamarelle tells us "Integrating Vault and Symfony does not require any PHP code. Using vault-agent secrets variables can be dumped into .env file. Dynamic secrets can even be used as feature flags."

Store Secrets in Vault with Symfony

 

Freek Van der Herten makes the claim "Ignition is the most beautiful error page for PHP apps. Yesterday, we launched a new major version of Ignition - you can check out all the details in this blog post.

Ignition used to be Laravel specific, but we've now created a framework-agnostic version as well. Let's try using Ignition in a simple Symfony app."

A better error page for Symfony applications

 

Leo Hajder asks "How often do you have to consume an external API and integrate it into a Symfony application? Let’s see how to do it fast and/or well, and hopefully learn something along the way. For this example, we’re going to take a look at how to get a response from an API endpoint and render the data in a twig template."

Consuming External APIs: basic tips & tricks

 

Timeless

Inspector logo

Sponsored Article

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

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.

 

 

PHP logo

PHP

 

This Week

 

In this well-written article, Ibrahim Alausa shows us how to future-proof our controllers.

A comprehensive guide on how to design future-proof controllers: Part 1

 

Hojjat has another introductory post for us and states "in this guide, we’ll use Docker to quickly deploy Redis using the official image on Docker Hub."

Deploy Redis as a Docker container [part 1]

 

Rob Hedgpeth says "The PHP programming language has long been considered a fairly light and simple solution for developers to use to create robust and creative web applications. In fact, that’s as true now as it has ever been as past few versions of PHP have made the language more appealing than ever.

Like many other languages, PHP has the ability to take advantage of the power of MariaDB, and it’s actually a pretty simple and straightforward process."

Developer Quick Start: PHP and MariaDB

 

Last week, we shared Eric the Coder's article on Modern PHP. He adds to the series with a few new posts.

PHP crash course : Strings and Numbers

 

Yactouat finishes his series on PHP iterators and generators.

Introducing PHP custom collections with the `IteratorAggregate` interface

 

Backend Developer reviews the read-only property for us.

Php 8.1 New Features — Read-only Properties

 

Dolcer Engineering asks "have you ever worked on micro-services architecture with a lots of services where every one of them is created by different team and with different code standards? Situations like that are never ideal, but sometimes there’s no other choice, and you need to improve what you can. This was the exact problem we encountered."

Improve quality of PHP applications with static analysis and SonarQube

 

The following was popular when we shared it on Twitter. Dariusz Gafka shows us:

How To Integrate Micro-services

He continues with:

Starting with Micro-services in PHP

 

Brent at Stitcher.io writes "I want to share some actionable advice on how to deal with updating external dependencies. Because, let's face it, you want to update your project to PHP 8.1, but some of your dependencies don't support it. So, end of story, right?

Here's what I do in such cases."

Dealing with Dependencies

 

A new issue of PHP [Architect] is out and features Domain Driven Design.

The January edition of PHP [Architect] is out

 

Kristian Lentino shares his exploration of Rabbit MQ.

Trying out Rabbit MQ

 

Frank de Jonge says "using events in a system is great, but how do you know for sure if you've reliably dispatched your events? The transportation of events needs to be done reliably while maintaining overall system consistency, be it eventual or immediately. In a typical setup, a database is used to store information and queues are used to send messages between processes and systems. Often, the events are dispatched directly to the queue in the same action that stores information in the data. This may not seem to be obviously wrong, but there is a potential problem with this approach."

Reliable event dispatching using a transactional outbox 

 

Ajimoti Ibk show us how to:

Calculate PHP cache time with ease

 

Last Week

 

Git hooks are scripts that will run when a certain event occurs in git like git push, git pull, git commit, etc. We can find git hooks at .git/hooks in a particular git repository.

Precommit is a git hook, that triggers custom scripts or commands during the execution of a git commit.

In this article, we will format PHP code using prettier at a time of committing code to git.

Automation — PHP Code Formatting before (pre) git commit

 

Last Month

 

Ever found yourself wanting to make a small tweak to a PHP file in a Composer dependency? Here's how to do it without forking the entire package.

Overriding vendor classes in a Composer Dependency

 

Timeless

 

Joshua Otwell writes "If you’re a PHP/MySQL Developer, you have date function options for both the database and your programming language of choice. In this post, I cover 5 PHP date functions and their (somewhat) MySQL equivalents with examples of each."

5 PHP Date Functions and Their MySQL Equivalents

Code logo

Other

 

About.com Software provides a showcase on how to develop locally with Docker, using a remote database over a secure SSH tunnel. No Docker hacking and no firewall tinkering are required.

Easy Docker Tunnel for the win

 

Last week, I shared several articles about the challenges of open-source maintenance. This week, I am continuing the theme." As I have said before, if you use an open-source products please contribute to the maintainer(s).

 

GitHub participated in the White House meeting on open-source cybersecurity. In the post they "outline three themes that the GitHub Policy Team thinks should drive this conversation with policymakers—to help open-source prosperity and sustainability. These themes are only a starting point: if you have thoughts, please get in touch."

Open-source creates value, but how do you measure it?

 

Jeff Geerling shares his strategy for avoiding burnout as a maintainer for multiple projects.

The burden of an Open-Source maintainer

 

The Next Web notes "Just because you're OSS doesn't mean you have to be strapped for cash all the time."

6 ways open-source devs can make money

 

ZDNet makes this point "Instead of running around like headless chooks because a widely used piece of open source software is maintained by volunteers and has a massive hole in it, imagine paying someone to look after such software properly."

For security alone, we could try paying open-source projects properly

 

Shawn Hooper says "The problem is when projects get popular. You now end up with software that is used in thousands (millions?) of pieces of software that is at risk of a) its developer either abandoning the project due to new interests, changed life priorities or 2) the employer who was paying for the development work ends the project. "

On Open-Source and Importance of The PHP Foundation

 

Finally, TechCrunch notes "Most people don’t realize it, but many of the devices and apps you use every day are built on top of open-source software, maintained by one or two developers that aren’t paid for their time, who patch bugs and improve their code to give back to the community or as a passion project."

Open-source developers, who work for free, are discovering they have power

 

Tara Prasad Routray wants to help us "learn about the incredible new features that ship with the Tailwind CSS v3.0 release."

Top 10 Features Introduced In Tailwind CSS v3.0

 

Christoph Nißle's article is a well-done overview of the scattered nature of IT landscapes and the challenges they face.

Why you should decide to do API Management

 

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!

Author

Reuben Walker photo

 

Reuben Walker

Founder
Symfony Station

 

 

 


 

Subscribe to EasyAdmin

 

 

Follow Symfony Station on Mastodon Mastodon Icon Twitter Twitter Icon Flipboard Flipboard Icon or Our Newsletter Newsletter Icon