Symfony Station Communique - 5 November 2021. A Look at Symfony and PHP News.
Tags: symfony, php, docker, git
Published: 2021-11-05 04:30:53


 
 
This post originally appeared on [Symfony Station](https://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 is quite extensive so take your time and peruse it for the items most helpful to you.
 
Thanks to Javier Eguiluz and Symfony for sharing [our last communique](https://symfonystation.com/communiques/f/symfony-station-communique---29-october-2021) in their [Week of Symfony](https://symfony.com/blog/a-week-of-symfony-774-25-31-october-2021).
 
*Please note all links will open in a new browser window. My opinions, if I present any, will be in bold.


##Symfony

###This week

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

Highlight -> “This week, Symfony 4.4.33 and 5.3.10 maintenance versions were released. Meanwhile, Symfony development focused on finishing and polishing many new features for the upcoming Symfony 5.4 and 6.0 versions. Lastly, we announced new speakers for the SymfonyWorld Online 2021 Winter Edition conference (December 9-10, 2021) and some new additions to the Symfony Backers program.”

[A Week of Symfony #774 (25-31 October 2021)]
(https://symfony.com/blog/a-week-of-symfony-774-25-31-october-2021)


If you have a project using Symfony 4+ full-stack framework, there is a high chance that it is using Symfony Flex. Symfony Flex automatically configures packages when you install or upgrade them via official or contributed recipes. However, the way Symfony serves the recipes is changing, and you need to upgrade the symfony/flex package to take advantage of this change. They ask that you:

[Upgrade Flex on your Symfony projects](https://symfony.com/blog/upgrade-flex-on-your-symfony-projects)

 
Symfony 5.4 and Symfony 6.0 will be released simultaneously at the end of November 2021. According to the Symfony release process, both versions will have the same features, but Symfony 6.0 won't include any deprecated features.
This post is the first article of a series that shows the most important new features introduced by Symfony 5.4 and 6.0 versions.

New in Symfony 5.4: Console Autocompletion
https://symfony.com/blog/new-in-symfony-5-4-console-autocompletion
And the second.
 
[New in Symfony 5.4: Faster Security Voters]
(https://symfony.com/blog/new-in-symfony-5-4-faster-security-voters)

They also announced the fourth round of speakers for SymfonyWorld 2021 Online. I look forward to “Runtime component: The game-changer” from Tobias Nyholm.
 
[Fourth Round of Selected Speakers at SymfonyWorld 2021 Online 2021 Winter Conference]
(https://symfony.com/blog/fourth-round-of-selected-speakers-at-symfonyworld-2021-online-2021-winter-conference)
 
##Featured Item

We start to highlight the most significant post of the week in this edition. 

The first is from Mindfire Solutions who say:
When you want to build and deploy an application at high speed, you need a good framework. Since PHP is the most popular web application development language, we recommend Symfony as a suitable framework for development ventures.

[The distinct advantages of using PHP-Symfony Framework]
(https://medium.com/@mindfiresolutions.usa/the-distinct-advantages-of-using-php-symfony-framework-a95d8ca35577)


Via SymfonyCasts: the heart of Symfony's security system is the firewall. The firewall works by activating one or more "authenticators.” This week we bootstrap our very own.
 
[This week on SymfonyCasts] 
(https://5hy9x.r.ag.d.sendibm3.com/mk/mr/urPQWcy8Jbg6Fl3Sc5TR_Uy9ZSU2Eg4khROIx0NHBO-CBiCYrmb435BNCOz7jb2KhKySpGfBfZC_ly-0E8Yo1ZRqbASXrm_o1n56QdAvZBliZsUIQ_Ra_Cch__yS_gtnrg8odKauVQ)


Wouter Carabain, who provides some helpful info on his new blog, began a new series of posts looking at pairing Symfony with API Platform. Here’s the second one and a follow-up of the post we shared in our last communique.


[How to create a simple application using Symfony and React Native – Part 2]
(https://woutercarabain.com/webdevelopment/how-to-create-a-simple-application-using-symfony-and-react-native-part-2/)

###Last Week

In this Stangebuzz post, we learn how to create custom PHPStan rules for a Symfony project. We explore Symfony best practices but also more specific rules.

[Creating custom PHPStan rules for your Symfony project]
(https://www.strangebuzz.com/en/blog/creating-custom-phpstan-rules-for-your-symfony-project)


Benjamin Beganović was experimenting with Symfony and realized he didn't like the act of validating the request body in the controller method itself. So he thought it might be a good thing to try a cleaner way to do this.
 
[Validating requests in the Symfony app]
(https://dev.to/beganovich/validating-requests-in-the-symfony-app-2g0a)
 

###Timeless

I ran across Akashic Seer’s blog this week, which is a treasure chest of Symfony-related posts. He has quite the take on things, and I appreciate it as a curmudgeon and lover of profanity myself. I will share them with you in the coming weeks.

[How to get URL Routes in your Javascript in Symfony 5+]
(https://akashicseer.com/web-development/how-to-get-url-routes-in-your-javascript-in-symfony-5/)
 
He also has this gem.
 
[How to create a cookie in Symfony 5.0+ and render a template in a controller]
(https://akashicseer.com/web-development/how-to-create-a-cookie-in-symfony-5-0-and-render-a-template-in-a-controller/)


Coming from the WordPress side of PHP development, I enjoyed this older post from one of my favorite publications.
 
[Using the Symfony Options Resolver in WordPress]
(https://torquemag.io/2018/03/using-symfony-options-resolver-wordpress/)
 
Their owner had this to say “We’ve discussed WordPress many times, and it’s our favorite option for getting a website up and running. However, a PHP framework – essentially a basic structure or platform for development – also offers plenty of flexibility, although at the cost of additional time and possibly money.”
 
[WordPress CMS vs. PHP Framework: Which is Better for My Website?]
(https://wpengine.com/resources/cms-vs-php-framework/)


 
Here’s another WordPress and Symfony article. Carlos Matos notes that although WP_Query is primarily for internal requests, commonly it’s a data provider for WP API endpoints. Also, it grabs posts and data and generates export files. For this last situation, getting query responses automatically in different formats could be handy.
 
[Using Symfony and WP_Query to return multiple formats]
(https://wp-helpers.com/2021/03/10/using-symfony-and-wp_query-to-return-multiple-formats/)


 
 


##PHP

###This week

A PHP RFC proposes using GitHub Issues on the PHP repository in place of its own bugs.php.net bug tracker. Currently, GitHub issues are being used for documentation issues and website issues on the respective repositories. This RFC expands usage to the PHP implementation itself.

[PHP RFC: Migrating to GitHub Issues]
(https://wiki.php.net/rfc/github_issues)


If you’re not familiar with PHPStan, it’s a static analyzer for PHP focused on finding bugs in your code. It catches whole classes of bugs even before you run your app at all. They also have a great logo. ;)

[PHPStan 1.0 Released!]
(https://phpstan.org/blog/phpstan-1-0-released)


Managing a database can be complicated. phpMyAdmin exists to make the process much easier. Learn how to install and configure it with this detailed video tutorial.

[How to Install phpMyAdmin on Any Operating System]
(https://www.youtube.com/watch?v=PxAwg6AYvCg)

 
PHP Architect’s October issue covers cryptography. Listen to this podcast for the details.

[Decrypting Cryptography]
(https://www.phparch.com/podcast/decrypting-cryptography/)
 
Iacovos Constantinou writes that it is good to include all the third-party dependencies coming from composer install when working with PHP projects and Docker. This approach helps to reduce the time needed to spin off a new container. However, when not done right, it can significantly increase the build time. We will see how we can avoid this and optimize composer install for docker builds through his post.

[Faster Docker builds with composer install]
(https://medium.com/@softius/faster-docker-builds-with-composer-install-b4d2b15d0fff)


Frank De Jonge says bugs caused by race conditions can be a huge source of frustration. They are challenging to identify and often difficult to remedy. Guarding against data inconsistencies should always be top of mind. At the very least, unexpected inconsistencies require attention from support or a developer. In worse situations, inconsistencies can cause a company to lose its license to operate as a financial institution.

[Ensuring data(base) consistency during concurrent requests]
(https://blog.frankdejonge.nl/ensuring-consistency-during-concurrent-requests/)


JoliCode has this review of the presentations at Forum PHP 2021 in Paris. C’est en francais si’ vous plait.

[Forum PHP 2021 : l’édition des retrouvailles]
(https://jolicode.com/blog/forum-php-2021-ledition-des-retrouvailles)


Ahmed Khan highlights several IDE and code editors that have captured the attention of the global software development communities, like PHP and Python, and will continue to be popular in 2021.

[Top Code Editors and IDE for PHP Development of 2021]
(https://www.cloudways.com/blog/top-ide-and-code-editors-php-development/)


Doeken.org’s blog continues its excellent series of posts on programming patterns with this article.

[Visitor Pattern: Make entities more extendable by accepting a visitor]
(https://doeken.org/blog/visitor-pattern)
 

###Last Week


Eugenio Carocci looks at mocking third-party services in integration testing in Docker with MockServer.

[Mocking Third-Party Services in Integration Testing]
(https://medium.com/geekculture/mocking-third-party-services-in-integration-testing-7ded9ac1fe83)


Kerry Doyle notes that looking to keep up with the demand for increasingly sophisticated development capabilities, PHP 8 brings interesting new integrations that transcend the realm of web development. He makes an important point about how PHP will have to compete with Web Assembly.

[PHP 8 features that prove it's for more than just web]
(https://searchapparchitecture.techtarget.com/tip/PHP-8-features-that-prove-its-for-more-than-just-web)
 

###Last Month


Iain Cambridge says Doctrine is one of the most used ORMs in PHPLand, with many applications heavily coupled to it. With organizations moving to microservices one common task is to migrate their entities to come via microservice instead of Doctrine. Here he describes how to migrate an entity so that it’s stored in a Microservice instead of MySQL via Doctrine.

[Migrate Entities to Microservice From Doctrine]
(https://www.theretro.dev/article/migrate-entities-to-microservice-from-doctrine/)

Iain also has this convincing article.

[How Much of a Difference does Opcache Preloading Make?]
(https://www.theretro.dev/article/the-difference-opcache-preloading-makes/)


##Other

###Let’s Git with it

There was lots of Git-related news this week. 

To start Vijay Gurbaxani looks at GitLab’s IPO and what it portends.

[What GitLab’s $11 Billion IPO Says About In-House Software Development: Iterate To Innovate]
(https://www.forbes.com/sites/vijaygurbaxani/2021/11/02/what-gitlabs-11-billion-ipo-says-about-in-house-software-development-iterate-to-innovate/?sh=3a2d327158e3)



The world’s software depends on open source projects, so open-source maintainers must use their time productively. GitHub’s excited to share new features to increase the quality of contributions and help maintainers focus on what matters most to the success of their projects.

[GitHub keeps getting better for open source maintainers]
(https://github.blog/2021-11-01-github-keeps-getting-better-for-open-source-maintainers/)

GitHub also published this helpful post on GitHub Actions.

[10 GitHub Actions resources to bookmark from the basics to CI/CD]
(https://github.blog/2021-11-04-10-github-actions-resources-basics-ci-cd/)


Serhey Dolgushev recently came across a somewhat unusual use case where he already had an active pull request but wanted to augment it. Of course, he could just wait and submit a new pull request once the initial one had been reviewed and merged. But let's be honest, who likes to wait? So his team decided to submit a new pull request based on the active pull request. Here's how they did it.

[Git: submitting a new Pull Request based on another active Pull Request]
(https://www.contextualcode.com/Blog/Git-submitting-a-new-Pull-Request-based-on-another-active-Pull-Request)
 
In this article, Tobia Gunther looks at integrating branches. How can you get new code back into an existing line of development? There are different ways to achieve this. The fifth episode of his “Advanced Git” series discusses integrating changes in Git, namely merging and rebasing.

[Rebase vs. Merge: integrating changes in Git]
(https://css-tricks.com/rebase-vs-merge-integrating-changes-in-git/)
 
Finally, Akash Thakur notes that all of us who have worked on git as a version control system must have come across these two merging strategies: fast-forward merge and merge made by recursive strategy. But often, since most things are taken care of by git itself, we do not exactly know what might have happened in terms of git history. So he takes a look here.
 
[Git Merging Strategies: A Simple Explanation and Guide]
(https://javascript.plainenglish.io/git-merging-strategies-a-simple-explanation-and-guide-9e7e508b369c)

###That’s enough Gitting

Kolade Chris will take you through 9 best practices to follow while making REST APIs in this post. It will help you make the best APIs possible and make your API consumers’ lives easier.

[REST API Best Practices – REST Endpoint Design Examples]
(https://www.freecodecamp.org/news/rest-api-best-practices-rest-endpoint-design-examples/)

 
On that note Postman asked interesting questions in a recent survey. One was to identify the top priorities for their organizations, and there was a clear winner: quality, coming in at 80%. Agility (66%) and reliability (65%) were next. Check them all out in their API report.

[2021 State of the API Report]
(https://www.postman.com/state-of-api/)
 
If you're looking for a Docker tool to take your development to next-level efficiency, Jack Wallen believes DockStation might be what you need.

[DockStation is the Docker GUI you've been waiting for]
(https://www.techrepublic.com/article/dockstation-is-the-docker-gui-youve-been-waiting-for/#ftag=RSS56d97e7)



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 this long 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](https://symfonystation.com/Communiques) so you get each week's communique direct in your inbox. And follow us on Twitter at [@symfonfystation](https://twitter.com/symfonystation).
 
Happy coding Symfonistas!
 

Reuben Walker
Founder [Symfony Station](https://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/).