Skip to content
Imdhemy
  • Home
  • Blog
  • About
  • Home
  • Blog
  • About

php

Check out the blog for all posts.

Better alternatives to empty() in PHP

Jul 19, 2024 · 5 min read

#php #code-quality #language-features #static-analysis #best-practices

Better alternatives to empty() in PHP

I’m working on a weekend project: a static code analysis tool for PHP, just because, well, why not? So, I’ve...
Read article →
Singleton Design Pattern in Laravel

Apr 15, 2024 · 5 min read

#php #laravel #singleton #service-container #dependency-injection

Singleton Design Pattern in Laravel

Google search console told me that I got some visits from people searching for “Singleton Design Pattern in Laravel”. But...
Read article →
How to avoid boilerplate code in Symfony Voters

Apr 3, 2024 · 10 min read

#php #symfony #authorization #code-reuse #voters

How to avoid boilerplate code in Symfony Voters

Symfony voters are the way to go when you need to centralize the authorization logic of your application. There have...
Read article →
What Symfony developers should know before using Voters

Apr 2, 2024 · 5 min read

#php #symfony #authorization #security #voters

What Symfony developers should know before using Voters

Voters are Symfony’s most powerful way of managing permissions. They allow you to centralize all permission logic, then reuse them...
Read article →
Hidden Gems in Composer Every PHP Developer Should Know

Apr 16, 2023 · 3 min read

#php #composer #dependency-management #developer-tools #security

Hidden Gems in Composer Every PHP Developer Should Know

Composer is the most popular PHP dependency manager. I’ve heard about other package managers like PEAR & Phing, but I’ve...
Read article →

Dec 30, 2021 · 5 min read

#php #design-patterns #singleton #laravel #software-architecture

PHP Real-world use cases of singleton design pattern

The singleton pattern ensures that a class has only one instance and provides global access to it. Okay, many developers...
Read article →

Sep 9, 2021 · 7 min read

#php #testing #elasticsearch #integration-testing #unit-testing

How to test Elasticsearch in PHP applications

Starting from Elasticsearch 8.0, they introduced multiple breaking changes in the Elasticsearch client library. This article is intended to v...
Read article →

Jun 2, 2021 · 10 min read

#php #design-patterns #builder-pattern #domain-modeling #oop

Why you need a builder to create your entities and models

Static factories and constructors share a limitation; they do not scale well to large numbers of optional parameters. Consider the...
Read article →

May 16, 2021 · 7 min read

#php #design-patterns #static-factory #object-creation #oop

Three advantages of using static factory methods in PHP

Constructor overloading is a concept of having more than one constructor with a different list of parameters. PHP doesn’t allow...
Read article →

© 2021 - 2026 . imdhemy.com Published by Jekyll, hosted on GitHub Pages.