Skip to content

[Security] get rid of string|mixed hack #49201

@Warxcell

Description

@Warxcell

Symfony version(s) affected

Description

why its type-hinted as string and then there is this?

https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php#L38-L40

Related issue:
#37325

This messes up the Static analysers.

How to reproduce

Symfony 5.* https://phpstan.org/r/9786dc67-c9ee-4bf7-9232-ffbc4c082256
Symfony 6.* https://phpstan.org/r/c28b5633-bf91-43da-ab34-c0bca8c42711

Possible Solution

either make it mixed either remove the hack + typehint isGranted with string also. This hack exists since 5.0 - it should be removed in 6.0 as BC can be break in major releases.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy