Skip to content

Commit f0751d0

Browse files
committed
minor #6561 Fix return of context provider to return the context interface (andersonamuller)
This PR was merged into the 4.x branch. Discussion ---------- Fix return of context provider to return the context interface Commits ------- a42bfa4 Fix return of context provider to return the context interface
2 parents 25ce444 + a42bfa4 commit f0751d0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Contracts/Provider/AdminContextProviderInterface.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace EasyCorp\Bundle\EasyAdminBundle\Contracts\Provider;
44

5-
use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext;
65
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Context\AdminContextInterface;
76

87
/**
@@ -14,5 +13,5 @@ interface AdminContextProviderInterface extends AdminContextInterface
1413
{
1514
public function hasContext(): bool;
1615

17-
public function getContext(bool $throw = false): ?AdminContext;
16+
public function getContext(bool $throw = false): ?AdminContextInterface;
1817
}

src/Inspector/DataCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace EasyCorp\Bundle\EasyAdminBundle\Inspector;
44

55
use EasyCorp\Bundle\EasyAdminBundle\Config\Option\EA;
6-
use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext;
6+
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Context\AdminContextInterface;
77
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Provider\AdminContextProviderInterface;
88
use Symfony\Component\HttpFoundation\Request;
99
use Symfony\Component\HttpFoundation\Response;
@@ -51,7 +51,7 @@ public function getData(): array
5151
return $this->data;
5252
}
5353

54-
private function collectData(AdminContext $context): array
54+
private function collectData(AdminContextInterface $context): array
5555
{
5656
return [
5757
'CRUD Controller FQCN' => null === $context->getCrud() ? null : $context->getCrud()->getControllerFqcn(),

0 commit comments

Comments
 (0)