PHP Symfony Sonata

Month September 2026

Symfony: Uid in API

Avoid exposing internal entity IDs in your API. In this article, we’ll see how to use UUID v7 with Symfony Uid, from generating and storing UUIDs to documenting them with NelmioApiDoc and querying them with Doctrine.

Symfony: How to Log Exceeded Failed Login Limits

This article shows how to log the moment when Symfony’s failed login limit is exceeded. It explains why the user cannot be retrieved directly in this case and how to obtain the user identifier, while keeping standard failed login attempts working as expected.

Symfony: User Login Logs

This article shows how to log successful logins, failed login attempts, and logouts in Symfony using security events. It explains how to handle edge cases caused by login throttling and expired sessions, and how to configure trusted proxies in Azure so that the logs contain the client’s actual IP address instead of the load balancer’s IP.

Symfony: Limiting the Number of Failed Login Attempts

In this article, I show how to limit failed login attempts in Symfony using the Rate Limiter component. You’ll learn how to block repeated login attempts and configure Redis as a shared cache pool for applications running on multiple Azure instances. The article also covers configuring custom rate limiters for APIs.

Symfony: Checking for Entity Differences in Doctrine 2

In this article, I show how to use Doctrine 2 UnitOfWork to detect changes in an entity. You’ll learn how to retrieve the original entity data and inspect a change set containing both old and new values, as well as how to efficiently check changes for a single entity.

Symfony: Code Quality

Learn how to keep PHP code consistent, clean, and maintainable with a practical code quality setup. This guide presents a configuration using PSR-12, .gitattributes, PHP CS Fixer, and PHPStan to automate code formatting, ensure consistent line endings, and catch potential problems before they reach production.

Symfony: Custom Bundle

Learn how to create a custom Symfony Bundle in newer Symfony versions, where the bundle structure and configuration approach have changed. This guide walks through creating a bundle from scratch, organizing its files, configuring services and autowiring, loading configuration automatically, and installing the bundle with Composer.

Sonata Admin: Path to Media Files in REST

Learn how to include the file path of Sonata Media Bundle files in a Symfony REST API response. This guide shows how to create a custom serializer that uses Sonata Media’s built-in `path` function and adds the media path only for the required serialization group.

Sonata Admin: How to Install

Installing Sonata Admin can be a little confusing when following the official documentation. This guide provides a more straightforward, practical setup covering Sonata Admin, Doctrine ORM, Sonata User Bundle, routing, security, database configuration, and the first admin user. It also includes solutions to common installation errors and the package versions used in the setup.

Symfony: Cache Redis

Learn how to configure Redis as an application cache in the Symfony framework. This guide outlines the required environment variables for the Redis service and the Symfony cache configuration, along with recommendations.

« Older posts

© 2026 PHPNotes — Powered by WordPress

Theme by Anders Noren — Up ↑