Symfony Station Communique - 19 November 2021. A Look at Symfony and PHP News.
Tags: symfony, php, docker, cli
Published: 2021-11-19 13:28:29

This post originally appeared on [Symfony Station](
https://www.symfonystation.com/Communiques).
 
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. This week it’s pretty extensive, so take your time and peruse it for the most valuable items.
 
Thanks to Javier Eguiluz and Symfony for sharing [our last communique](https://www.symfonystation.com/Symfony-Station-Communique-12-November-2021) in their [Week of Symfony](https://symfony.com/blog/a-week-of-symfony-776-8-14-november-2021).

 
*Please note all links will open in a new browser window. My opinions, if I present any, will be in bold.

![Symfony logo](https://symfonystation.com/sites/default/files/inline-images/symfony-logo-no-text.png)

##Symfony

###This week

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

Highlight -> “This week, Symfony development activity focused on polishing and tweaking the upcoming Symfony 5.4 and 6.0 releases (both will be published before the end of this month). In addition, Symfony announced a new sponsoring program for SaaS providers to back their Symfony bridges.”

[A Week of Symfony #776 (8-14 November 2021)](https://symfony.com/blog/a-week-of-symfony-776-8-14-november-2021)

 
Javier continues a series of posts on what’s new in Symfony 5.4.

[New in Symfony 5.4: New Validation Constraints](https://symfony.com/blog/new-in-symfony-5-4-new-validation-constraints) 
[New in Symfony 5.4: Configurable Exceptions](https://symfony.com/blog/new-in-symfony-5-4-configurable-exceptions)
[New in Symfony 5.4: Filesystem Path Class](https://symfony.com/blog/new-in-symfony-5-4-filesystem-path-class)
[New in Symfony 5.4: Redesigned Profiler Logs](https://symfony.com/blog/new-in-symfony-5-4-redesigned-profiler-logs)
[New in Symfony 5.4: Language Negotiation](https://symfony.com/blog/new-in-symfony-5-4-language-negotiation)



Great deals are available if you are looking for official certification.

[Black Friday 2021 Offers from the Symfony Ecosystem](https://symfony.com/blog/black-friday-2021-offers-from-the-symfony-ecosystem)


This one is self-explanatory.
[Symfony 6.0.0-BETA2 released](https://symfony.com/blog/symfony-6-0-0-beta2-released)


Symfony has announced the final schedule for SymfonyWorld Online 2021 Winter Conference. We're excited about the Symfony 6 sessions (of course) and the ones on design patterns, runtime, Docker, TWIG, API platform, and Symfony UX! 

[Announcing the Final Schedule of SymfonyWorld Online 2021 Winter Conference](https://symfony.com/blog/announcing-the-final-schedule-of-symfonyworld-online-2021-winter-conference)

They also announced the new and retiring members of the Symfony Core Team.

[New Core Team Members, 2021 Edition](https://symfony.com/blog/new-core-team-members-2021-edition)

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

##Featured Item
**We continue to highlight the most significant post of the week.**


###Get involved with this!

The first event was this Thursday, but it is a year-long initiative.

Denmark notes: “Digital solutions can promote human rights, bring people closer to the decisions that influence their lives, and make democratic institutions stronger and more responsive. Yet online, expectations and aspirations for democracy have not been fully met. Digital technologies pose a severe threat to democracies globally and our democratic practices.”

[Join us to make tech work for democracy and human rights!](https://techfordemocracy.dk/)


Via SymfonyCasts: “Another busy week in Symfony Security! So let's get down to business.” 

[This week on SymfonyCasts](https://5hy9x.r.ag.d.sendibm3.com/mk/mr/Y7pmZuSKCPrRs2rY9mCHTSeoD-yG8CW7x7pPARUGdEdM_yJUmeHST2T7g7dsmvKVIa4L0WezNLyDBtauw00KIdX-suCG8qQDpzCD-UBjZOeL-jrX3LeFs3b1AP6oozddeJyOOO1qrA)
 
This one is self-explanatory. 

[Getting the first character of a string with PHP and Symfony.]( https://www.strangebuzz.com/en/snippets/getting-the-first-character-of-a-string-with-php)


The following post looks at using the Svelte javascript framework with Symfony.

[Svelte + Symfony, ma cure d’amincissement](https://www.dev-web.io/2021/11/09/svelte-symfony-ma-cure-damincissement/)
 
We curated several posts last week from Mickaël Andrieu. Here is another one from his series on controlling the quality of your Symfony and PHP projects.

[Contrôlez la qualité de vos projets PHP & Symfony à l’aide des GitHub Actions](https://mickael-andrieu.medium.com/contr%C3%B4lez-la-qualit%C3%A9-de-vos-projets-php-symfony-%C3%A0-laide-des-github-actions-2e82ce7f83b6)


Matthias Noback says: “a paradigm shift happened years ago when we went from symfony1 to Symfony 2, introducing the Dependency Injection container. The idea of Dependency Injection was quite new to many developers back then, and we had to talk and read about it a lot before we were ready for this amazing yet weird concept. What got in the way of adoption, I think, was the Yaml or XML syntax for service definitions, an approach that was probably copied from Spring. If we'd start by writing our service containers in plain PHP, that would've been much easier to learn and do.”

[The Dependency Injection Paradigm](https://matthiasnoback.nl/2021/11/the-dependency-injection-paradigm/)


Alexandre Daubois notes: “I’ve been involved in the addition of enumerations support in the Symfony framework. A news item was posted on Symfony’s blog about enumerations in the framework. You may want to read it first! This article is a supplement with additional code snippets and information.”

[Using PHP 8.1 enumerations in Symfony: Symfony 5.4/6.0 will support them from day one.](https://alex-daubois.medium.com/using-php-8-1-enumerations-in-symfony-af5ba761135d)


Wouter Carabain has another article on his Symfony and React app. 

[Tying up loose ends & Stock Portfolio API (Part 4)](https://woutercarabain.com/webdevelopment/tying-up-loose-ends-and-stock-portfolio-api-part-4/)


Techno Craft has two articles covering command line interfaces and Symfony.

[How to create a custom CLI and use it in Symfony (part1)](
https://medium.com/@technocraft.devops/how-to-create-a-custom-cli-and-use-it-in-symfony-part1-a41b2a763549)


[How to create a custom CLI and use it in Symfony (part2)](https://medium.com/@technocraft.devops/how-to-create-a-custom-cli-and-use-it-in-symfony-part2-cf688df73834)


Marco Pfeiffer notes that there are only 2 types of database relations. All other types are usually bugs.

[Mastering Doctrine ORM relations](https://medium.marco.zone/mastering-doctrine-orm-relations-571060c5b40e)



###Timeless


Soft Gorillas says: “Choosing the right technology for application development is an important task. However, a lack of knowledge about the most popular tech stack may result in choosing a framework that will not assure great performance or crucial features. So today, we’d like to tell you more about Symfony.”

[Symfony — why it's a good technology for your business application development](https://medium.com/@Softgorillas/symfony-why-it-a-good-technology-for-your-business-application-development-4957645d044c)


Olususi Oluyemi has this classic post for us.
 
[Creating your First Symfony App and Adding Authentication](https://auth0.com/blog/creating-your-first-symfony-app-and-adding-authentication/)


I ran across Akashic Seer’s blog this month, which is a treasure chest of Symfony-related posts. Here are a few posts from his archive.

[How does login and authentication work in Symfony 5?](https://akashicseer.com/web-development/how-does-login-and-authentication-work-in-symfony-5/)

[Symfony 5+: how to import or link to javascript and CSS files with webpack encore.](https://akashicseer.com/web-development/symfony-5-how-to-import-or-link-to-javascript-and-css-files-with-webpack-encore/)


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

##PHP

###This week


Just how fast is PHP 8.1? It’s this quick. Wow.

[Automatic performance benchmarking: PHP 8.1 is ~30% faster than PHP 7.4](https://externals.io/message/116323)


“These days we hear a lot about dynamic properties in PHP and the possibility of it being deprecated by version 8.2, only to disappear from version 9. The proposal is documented in a dedicated RFC, and it generated a lot of discussions especially on the social networks (like Twitter, etc),” says Roberto Butti.

[PHP, what are dynamic properties?](https://medium.com/geekculture/php-what-are-dynamic-properties-2509c6fbccf8)

Roberto also published this very useful e-book. "50 drops of PHP" is an open-source e-book, that you can download for free. It collects 50 useful, unknown, and underrated PHP functions.

[50 Drops of PHP](https://dev.to/robertobutti/50-drops-of-php-433m)


Fabio Hiroki looks at the Adapter pattern’s use with email notifications. Its purpose is to make classes that have incompatible interfaces work together. 

[PHP Design Patterns — Adapter](https://fabiohiroki.medium.com/php-design-patterns-adapter-dce46dc74a2a)


Arash has another interesting pattern post on Medium.

[Strategy Design Pattern In PHP8](https://medium.com/@arash-jafari/strategy-design-pattern-in-php-8-9c8bb2793e18)


Also, on Medium, Patrick Augustus looks at inheritances and traits in PHP. You will probably need the translate button on this one.

[Horizontal Inheritances with Traits in PHP](https://medium.com/@trickaugusto1206/heran%C3%A7as-horizontais-com-traits-em-php-8a31929da2fd)


Here’s some excellent information on using PHP and the Nginx server with Docker from Samuel Fontebasso in these two articles.

[PHP+Nginx with Docker in production: Part 1 - Introduction](https://blog.fontebasso.com.br/php-nginx-with-docker-in-production-20ffdb73ec5b)

[PHP+Nginx with Docker in production: Part 2 - Running your code](https://blog.fontebasso.com.br/php-nginx-with-docker-in-production-cc1a9be05b91)


Unlike traditional PHP, where you run servers behind an Apache or Nginx HTTP service with either mod_php or PHP-FPM enabled, your PHP applications would run using a stateless model, whereas Swoole runs using a stateful model. By design, Swoole runs in memory. It takes advantage of saving things in memory, so you don't have to reload everything for every request coming into your servers.

[Isolating global variables with a co-routine context manager in Swoole](https://www.swoole.co.uk/article/isolating-variables-with-coroutine-context)

Arjuna Sky Kok says: “Dealing with dates and times is one of those things that can frustrate programmers a lot. At the same time, they are fundamental to software development, used from everything from meta and how things are ordered to time-based triggers and lots in between.

Dates and times are prone to errors too. Handle them incorrectly, and they can confuse end-users and fellow programmers alike.

This is a quick guide to dealing with dates and times specifically in the PHP programming language.”

[PHP Date and Time Recipes](https://css-tricks.com/php-date-and-time-recipes/)



###Last Week

 
Speaking of time, Rubén Rubio - great name ;) - says: “It is a good practice to use an interface to manage the clock in an application, as it allows having full control of time. For example, it eases testing, as it lets us define the concrete time for each test.”

[Stopping time with PHP](https://dev.to/filmineng/stopping-time-with-php-3m8k)


PHP Architect has an enticing new book out. It’s worth a look.

[The Complementary PHP Testing Tools Cookbook](https://www.phparch.com/books/the-complementary-php-testing-tools-cookbook/https://smaine-milianni.medium.com/larchi-hexa-est-ce-archi-bien-fd0449b32e33)


###Timeless


Ashley Allen states: “In programming, it's important to make sure that your code is readable, maintainable, extendable, and easily testable. One of the ways that we can improve all of these factors in our code is by using interfaces.”

[Using Interfaces to Write Better PHP Code](https://ashallendesign.co.uk/blog/using-interfaces-to-write-better-php-code)



Ashly Rich attended a talk a few years ago and found out how vastly complicated cryptography is and how PHP is making encryption more accessible thanks to the introduction of Sodium. Data encryption in PHP has been vital to his work on SpinupWP, a cloud-based server control panel with root access to thousands of servers and sites.

[Best Ways to Encrypt Passwords, Keys, & More with PHP in 2021](https://deliciousbrains.com/php-encryption-methods/)

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

##Other

Cinto provides a look at an important topic, SSL and TLS.

[A Highly Simplified Overview of SSL/TLS: Understanding network communication using real-life analogies](https://betterprogramming.pub/a-highly-simplified-overview-of-ssl-tls-dc4068543253)


Mateusz Cholewka notes: “Nowadays we are using docker a lot in web development. It’s easy to use, great for scaling, and gives us an immutable environment for running your application from local development to deploying on production. However, to get the best experience when using docker, you should apply some practices to get fast and light builds of your docker images.”

[Here are the Dockerfile tips you can use to get your builds faster and safer.](https://medium.com/@kontaktmtk3d/here-are-the-dockerfile-tips-you-can-use-to-get-your-builds-faster-and-safer-51ae8d16a6c7)


Abdul Wahab says: “In general, web services have been in existence for just as long as the HTTP protocol has existed. But, since the beginning of cloud computing, they have become the ubiquitous method of enabling client interaction with services and data.”

[API Architecture — Design Best Practices for REST APIs](https://abdulrwahab.medium.com/api-architecture-best-practices-for-designing-rest-apis-bf907025f5f)


This post is more like a short book so bookmark it for reading at your leisure.

[The Ultimate Introduction To Agile Project Management](https://www.toptal.com/project-managers/agile/ultimate-introduction-to-agile-project-management)

Image Credit: Rafael Henrique/SOPA Images/LightRocket via Getty Images

Hear from CIOs, CTOs, and other C-level and senior execs on data and AI strategies at the Future of Work Summit this January 12, 2022. Learn more

In this year’s GitHub Octoverse Report, their research tells you how to improve your performance and well-being by developing code, creating documentation, and supporting communities in smarter, more sustainable ways.

[State of the Octoverse](https://octoverse.github.com/)

OpenAI removed the waitlist for GPT-3, its large language model that can automatically write emails and articles, compose poetry, create code across a dozen programming languages, and more. Any developer in a supported country can sign up to begin integrating the model with their app or service.

[OpenAI makes GPT-3 generally available through its API](https://venturebeat.com/2021/11/18/openai-makes-gpt-3-generally-available-through-its-api/)



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. Next week is also the Thanksgiving holiday in the U.S. so it may be a short (or long) edition. It depends on how much time I want to spend around the in-laws. ;)
 
Please share this post. :) Be sure to join our newsletter list (at the bottom of [this page](https://symfonystation.com/Communiques), so you get each week's communique directly in your inbox (a day early). And [follow us on Twitter](https://twitter.com/symfonystation) at @symfonfystation.
 
Happy coding Symfonistas!
 
![Photo of Reuben Walker](https://symfonystation.com/sites/default/files/inline-images/Reuben_5.png)

Reuben Walker
Founder [Symfony Station](https://www.symfonystation.com/)
Reuben is also Ringmaster of [Mobile Atom Media](https://media.mobileatom.net/) and its division [Mobile Atom Code](https://www.mobileatom.net/).