Elegant immutable object pattern in PHP (dev.to)
As many of you know, immutability is an extremely useful concept that makes code more predictable and...
As many of you know, immutability is an extremely useful concept that makes code more predictable and...
Early this year, I created a few custom Rector rules for our client. It modified the code based on the PHPUnit error result report. The only problem is that PHPUnit outputs a string. So, I had to parse it manually with regexes. Having a JSON output would make my life easier. I'm used to PHP tools that provide the JSON out of the...
The repository pattern is a data source abstraction that behaves like a collection; containing domain (value) objects.
Like many worldwide, the recent ownCloud vulnerabilities got us worried as security professionals and tool authors. According to this blog, the vulnerability was caused by a test file in the vendor directory.
How to effectively use interfaces to make your PHP package easier to work with and more customizable than ever before.
Write readable, tabular test data for Pest and PHPUnit tests that allow you to describe data in a Markdown table-like format and compare it to the actual data.
PHP RFC: Nullsafe operator Introduction This RFC proposes the new nullsafe...
As a PHP developer, the tools you choose can make all the difference in your workflow and...
Interview With Eric Mann Release Manager PHP 8.3 In this episode, Scott talks with Eric Mann about his experience as one of the PHP 8.3 Release Managers and writing his book PHP Cookbook. Note: this transcript was transcribed by AI and then edited for clarity. Scott Keck-Warren: Hello developers, and welcome to the...
Features that make PHP go forward: which are the features that PHP projects adopts, as soon as they can drop backward compability?
FrankenPHP is a project I've been keeping an eye on for a while. It's an alternative way to run PHP applications on the web without using php-fpm, which makes it easier to deploy with Docker as you don't need to deploy multiple containers for both nginx and php-fpm, or deploy one container that runs both processes.
PHP 8.3 has already been released a few months back and it’s time to look at what’s coming in PHP 8.4.
Engaging with generative AI-powered chatbots has never been easier! Amazon Q, a dynamic alternative...
In the dynamic world of web development, PHP has been a stalwart, powering countless websites and...
Welcome to the December edition of PHP Annotated! In it, we look back over some of the most interesting developments in the PHP community during the past month, featuring handpicked news, articles, to
In the first post, we looked at the long-term effects of our decisions. Turning a legacy project into a fresh one is a matter of the "just do it" approach. But there are 3 things we should take with care even if our project seems outside the legacy project category. First of those are arrays.
As a designer and frontend developer, I often find myself working on various projects. Recently,...
How to have a smooth migration from array to object : use PHP dynamic syntax, and use both of them while modernizing your PHP code
In a recent shift of maintainership, Juliette Reinders Folmer has taken the helm of the PHP_CodeSniffer project, injecting fresh energy and vision into its development. This transition marks a pivotal moment, emphasizing the importance of community support, particularly from corporate entities. As a vital tool for maintaining...
PHP 8.1: The Rise of Enumeration PHP 8.1 introduces the syntax for the Enumeration. I was...
Like many other programming languages, PHP allows throwing and catching exceptions. If you surround...
The Symfony Universe collection contains kbin, Lemmy, and chirp magazines related to the Symfony universe of frameworks, e-commerce platforms, CMSs, code, communities and more.
It was not trivial to setup nginx with php-fpm to run in separate containers in kubernetes. Therefore I want to explain how I got it to work.
PHP 8.3 is a major update of the PHP language. It contains many new features, such as explicit typing of class constants, deep-cloning of readonly properties and additions to the randomness functionality. As always it also includes performance improvements, bug fixes, and general cleanup.
In PHP, the switch statement is a powerful tool for controlling program flow, especially when dealing with multiple conditional branches. However, achieving a clean and efficient switch has its own snags. This post explores essential tips and practices for checking the quality of a ‘switch’ command to ensure code quality and...