Skip to content

Conversation

@HypeMC
Copy link
Member

@HypeMC HypeMC commented Jun 6, 2022

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Deprecations? yes
Tickets -
License MIT
Doc PR -

The service alias for Symfony\Component\Security\Core\Security was removed in #46094 which causes existing code to break when upgrading to 6.2, eg:

use Symfony\Component\Security\Core\Security;

class HomeController extends AbstractController
{
    public function __construct(private Security $security)
    {
    }
}

results in:
image

@chalasr
Copy link
Member

chalasr commented Jun 6, 2022

You still get a TypeError with the patch, isn't it?
Answer: no, I made the new class extends the deprecated one.

@chalasr
Copy link
Member

chalasr commented Jun 6, 2022

Good catch, thanks @HypeMC.

@chalasr chalasr merged commit a1d6134 into symfony:6.2 Jun 6, 2022
@HypeMC HypeMC deleted the add-legacy-security-alias branch June 6, 2022 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants