- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
We could create more than one interface. For example:
/** * Access rules for a route. */ interface RouteAccessInterface { public function access(AccountInterface $account, RouteMatchInterface $route): AccessResultInterface; }
Taking this a step further, in a routing file, if the class defined in
_form
implements this interface, then its::access()
method could be used automatically instead of having to be defined in_custom_access
. - π¨π¦Canada Liam Morland Ontario, CA π¨π¦
I updated the summary.
If we are not going to deprecate
AccessInterface
then the@todo
in its code should be replaced with an explanation of when the interface should be used. - Status changed to Active
about 1 year ago 4:50pm 8 May 2024 - π¨π¦Canada Liam Morland Ontario, CA π¨π¦
Before we get into patches, we need to discuss what to do.
- π¦πΊAustralia acbramley
Trying to figure out what the way forward here is.
But #53 points to #34 which is going to be quite disruptive as per #35
People would then also need to add defence when parameters aren't defined otherwise static analysis tooling such as phpstan will complain on higher levels.
I like the idea in #73, funnily enough core's
CsrfAccessCheck
already aliasesAccessInterface
asRoutingAccessInterface
.