There are APIs which works with XML data format. It means that request and response represented in XML format. This tutorial provides example how to return object as XML response...
If we are developing a library that is used by multiple applications, then we have to be very careful when renaming class methods, removing unnecessary code or doing other breaking...
By default, if an application throws an exception, Symfony will turn that exception into an error with 500 HTTP status code, unless exception implements the HttpExceptionInterface or extends a class...
Symfony framework uses .env files for storing environment variables. In all environments (including prod), the .env files are loaded and parsed on each request. This process can be optimized in...
Symfony framework provides the JsonResponse class that allows to represent an HTTP response in JSON format. This class returns a JSON response that is not formatted and can be hard...
There might be a case to add a custom HTTP header to all the responses in Symfony application. It can be achieved by adding header on each controller method. However...
Symfony framework allows using profiler that gives debug information about various application parts during development. This tutorial explains how to enable profiler using URL query parameter in Symfony 7 application...
Symfony framework has a debug mode that helps to debug application during development. This tutorial explains how to check if debug mode is enabled in Symfony 7 application.
We can...
Symfony provides PasswordHasher component for hashing and verifying passwords. This component supports various built-in password hashers. There can be a case when password hasher is not implemented for the required...
PasswordHasher component provided by Symfony can be used to hash and verify passwords. This tutorial shows examples how to verify that password matches hash for a given user in Symfony...