Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HttpKernel] Add MapSessionParameter to map session parameters to controllers #54458

Open
wants to merge 1 commit into
base: 7.2
Choose a base branch
from

Commits on May 22, 2024

  1. [HttpKernel] Add #[MapSessionParameter] to pass a session parameter…

    … to a controller argument
    
    This attribute allow to pass an object from the session.
    The read/write to the public properties are proxied to the session using the property name as a key, or the value defined by the attribute SessionKey
    
    This allows to type property and have ide autocompletion, static validation and runtime validation of type.
    The default value of the argument is also used as a default value when not defined in session.
    
    In case of interfaces, the user will be required to provide a default value or make the parameter nullable.
    This check is done even if the session may have a value already to notify quickly of the potential issue
    jtattevin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    348c194 View commit details
    Browse the repository at this point in the history