A white paragraph.
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 quite extensive, so take your time and peruse it for the items most helpful items.
Thanks to Javier Eguiluz and Symfony for sharing our last communique in their Week of Symfony.
*Please note all links will open in a new browser window. My opinions, if I present any, will be in bold.
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)
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
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
And the second.
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
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
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.
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
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
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
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.
He also has this gem.
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
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?
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
If you are interested in WordPress Development you can follow Mobile Atom Code on Twitter for useful articles.
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
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. ;)
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
PHP Architect’s October issue covers cryptography. Listen to this podcast for the details.
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
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
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
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
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
Eugenio Carocci looks at mocking third-party services in integration testing in Docker with MockServer.
Mocking Third-Party Services in Integration Testing
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
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
Iain also has this convincing article.
How Much of a Difference does Opcache Preloading Make?
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
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
GitHub also published this helpful post on GitHub Actions.
10 GitHub Actions resources to bookmark from the basics to 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
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
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
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
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.
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
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 so you get each week's communique direct in your inbox. And follow us on Twitter at @symfonfystation.
Happy coding Symfonistas!
You can find a vast array of curated evergreen content.