Skip to content

Commit 84624b9

Browse files
committed
Add PHP8.5 polyfill
Uses the development version of symfony/polyfill-php85 because at this time, array_first is not part of the released version yet.
1 parent 8f4ff83 commit 84624b9

3 files changed

Lines changed: 83 additions & 3 deletions

File tree

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"symfony/mailer": "^7.3",
3737
"symfony/mime": "^7.3",
3838
"symfony/monolog-bundle": "^3.10",
39+
"symfony/polyfill-php85": "1.x-dev",
3940
"symfony/process": "^7.3",
4041
"symfony/property-access": "^7.3",
4142
"symfony/property-info": "^7.3",

composer.lock

Lines changed: 81 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EventListener/SecurityListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(
3131
#[AsEventListener]
3232
public function checkAccessIsGranted(ControllerEvent $event): void
3333
{
34-
if (null !== ($event->getAttributes(IsGrantedAccess::class)[0] ?? null)) {
34+
if (null !== array_first($event->getAttributes(IsGrantedAccess::class))) {
3535
if (!$this->publicAccess && !$this->authorizationChecker->isGranted('ROLE_USER')) {
3636
throw new AccessDeniedException();
3737
}

0 commit comments

Comments
 (0)