New in Symfony 5.1: HttpFoundation improvements
ParameterBag class defined by Symfony is like an object-oriented array
which stores related values and provides methods such as
has(), etc. Symfony defines specialized
ParameterBag classes for some
FileBag for uploaded files,
ServerBag for HTTP headers, etc.)
In Symfony 5.1 we've introduced a new
InputBag class (which extends from
ParameterBag) to manage values provided by the user (via
Encrypted session data¶
Encrypting data is one of the recommended ways to minimize the damage caused
by security leaks. In Symfony 5.1 you can encrypt the contents of the session
using a new
MarshallingSessionHandler, which in turn uses the marshaller
from the Cache component.
Use the following configuration to define the needed data to encrypt the sessions:
1 2 3 4 5
Symfony\Component\Cache\Marshaller\SodiumMarshaller: decorates: 'session.marshaller' arguments: - ['%env(file:resolve:SODIUM_DECRYPTION_FILE)%'] - '@.inner'
Support all HTTP Cache-Control directives¶
Symfony supports the most used HTTP Cache-control directives (
public , etc.). However, we were missing
some of them, so we decided to add support for all cache-control directives
in Symfony 5.1:
New in Symfony 5.1: HttpFoundation improvements symfony.com/blog/new-in-symfony-5-1-httpfoundation-improvementsTweet this
Become a certified developer! Exams are online and available in all countries.Register Now
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.