- Add support for enums in
SignatureHasher::computeSignatureHash() - Add
getParentRoleNames()method toRoleHierarchyInterface - Make
RoleHierarchyInterface::getReachableRoleNames()return roles as both keys and values
- Add argument
$accessDecisiontoAccessDecisionStrategyInterface::decide() - Remove
PersistentTokenInterface::getClass() - Remove the user FQCN from the remember-me cookie
- Remove
RememberMeToken::getSecret() - Remove
UserInterface::eraseCredentials()andTokenInterface::eraseCredentials(), erase credentials e.g. using__serialize()instead - Add argument
$accessDecisiontoAccessDecisionManagerInterface::decide()andAuthorizationCheckerInterface::isGranted() - Add argument
$votetoVoterInterface::vote()andVoter::voteOnAttribute() - Add argument
$tokentoUserCheckerInterface::checkPostAuth() - Make
UserChainProviderimplementAttributesBasedUserProviderInterface
- Add
MermaidDumperto dump Role Hierarchy graphs in the Mermaid.js flowchart format - Deprecate
PersistentTokenInterface::getClass(), the user class will be removed from the remember-me cookie in 8.0 - Add
extraDataproperty toVoteobjects - Add argument
$accessDecisiontoAccessDecisionStrategyInterface
- Add
UserAuthorizationCheckerInterfaceto test user authorization without relying on the session - Add
OfflineTokenInterfaceto mark tokens that do not represent the currently logged-in user - Deprecate
UserInterface::eraseCredentials()andTokenInterface::eraseCredentials(), erase credentials e.g. using__serialize()instead - Add ability for voters to explain their vote
- Add support for voting on closures
- Add
OAuth2Userwith OAuth2 Access Token Introspection support forOAuth2TokenHandler
- Make
AccessDecisionStrategyTestCasecompatible with PHPUnit 10+ - Add
$tokenargument toUserCheckerInterface::checkPostAuth() - Deprecate argument
$secretofRememberMeToken - Deprecate returning an empty string in
UserInterface::getUserIdentifier()
- Remove the
Securityclass, useSymfony\Bundle\SecurityBundle\Securityinstead - Require explicit argument when calling
TokenStorage::setToken() - Change argument
$lastUsedofTokenProviderInterface::updateToken()to acceptDateTimeInterface
- Make
PersistentTokenimmutable - Deprecate accepting only
DateTimeforTokenProviderInterface::updateToken(), useDateTimeInterfaceinstead
- Add
AttributesBasedUserProviderInterfaceto allow$attributesoptional argument onloadUserByIdentifier - Add
OidcUserwith OIDC support forOidcUserInfoTokenHandler
- Deprecate the
Securityclass, useSymfony\Bundle\SecurityBundle\Securityinstead - Change the signature of
TokenStorageInterface::setToken()tosetToken(?TokenInterface $token) - Deprecate calling
TokenStorage::setToken()without arguments - Add a
ChainUserCheckerto allow calling multiple user checkers for a firewall
TokenInterfacedoes not extendSerializableanymore- Remove all classes in the
Core\Encoder\sub-namespace, use thePasswordHashercomponent instead - Remove methods
getPassword()andgetSalt()fromUserInterface, usePasswordAuthenticatedUserInterfaceorLegacyPasswordAuthenticatedUserInterfaceinstead AccessDecisionManagerrequires the strategy to be passed as in instance ofAccessDecisionStrategyInterface
- [BC BREAK]
AccessDecisionStrategyTestCase::provideStrategyTests()is now static
- Add a
CacheableVoterInterfacefor voters that vote only on identified attributes and subjects - Deprecate
AuthenticationEvents::AUTHENTICATION_FAILURE, use theLoginFailureEventinstead - Deprecate
AnonymousToken, as the related authenticator was deprecated in 5.3 - Deprecate
Token::getCredentials(), tokens should no longer contain credentials (as they represent authenticated sessions) - Deprecate returning
string|\StringablefromToken::getUser()(it must return aUserInterface) - Deprecate
AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLYandAuthenticatedVoter::IS_ANONYMOUS, useAuthenticatedVoter::IS_AUTHENTICATED_FULLYorAuthenticatedVoter::IS_AUTHENTICATEDinstead. - Deprecate
AuthenticationTrustResolverInterface::isAnonymous()and theis_anonymous()expression function as anonymous no longer exists in version 6, use theisFullFledged()or the newisAuthenticated()instead if you want to check if the request is (fully) authenticated. - Deprecate the
$authenticationManagerargument of theAuthorizationCheckerconstructor - Deprecate setting the
$alwaysAuthenticateargument totrueand not setting the$exceptionOnNoTokenargument tofalseofAuthorizationChecker - Deprecate methods
TokenInterface::isAuthenticated()andsetAuthenticated, return null from "getUser()" instead when a token is not authenticated - Add
AccessDecisionStrategyInterfaceto allow custom access decision strategies - Add access decision strategies
AffirmativeStrategy,ConsensusStrategy,PriorityStrategy,UnanimousStrategy - Deprecate passing the strategy as string to
AccessDecisionManager, pass an instance ofAccessDecisionStrategyInterfaceinstead - Flag
AccessDecisionManageras@final
The CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md