From 4c0fbd050c331b3adf6eeb8aa1fa7c89f3596ada Mon Sep 17 00:00:00 2001 From: henk Date: Wed, 12 Oct 2022 10:17:26 +0200 Subject: [PATCH] - corrected composer.json - adapted to PHP 7.2 --- composer.json | 2 +- src/Filter/DateFilter.php | 2 +- src/Filter/FilterLogic.php | 2 +- tests/Filter/FilterLogicWithAnnotationTest.php | 4 ++-- tests/Filter/FilterToTestAssumptions.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 32050e5..e274c6d 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "require": { "php": ">=7.2.5", "symfony/http-kernel": "^4.4 || ^5.1 || ^6.0", - "api-platform/core": "^2.5", + "api-platform/core": "^2.7 || ^3.0", "doctrine/orm": "^2.7" }, "require-dev": { diff --git a/src/Filter/DateFilter.php b/src/Filter/DateFilter.php index 63027bf..2f6cee6 100644 --- a/src/Filter/DateFilter.php +++ b/src/Filter/DateFilter.php @@ -17,7 +17,7 @@ class DateFilter extends AbstractFilter implements DateFilterInterface { public const DOCTRINE_DATE_TYPES = ApipDateFilter::DOCTRINE_DATE_TYPES; - private ApipDateFilter $inner; + private $inner; public function __construct(ManagerRegistry $managerRegistry, LoggerInterface $logger = null, array $properties = null, NameConverterInterface $nameConverter = null) { diff --git a/src/Filter/FilterLogic.php b/src/Filter/FilterLogic.php index fb28053..a5ae611 100644 --- a/src/Filter/FilterLogic.php +++ b/src/Filter/FilterLogic.php @@ -42,7 +42,7 @@ class FilterLogic implements FilterInterface * but also changes the behavior of ExistsFilter =false. * {@inheritdoc} */ - public function __construct(ContainerInterface $filterLocator, protected ManagerRegistry $managerRegistry, protected ?LoggerInterface $logger = null, protected ?array $properties = null, protected ?NameConverterInterface $nameConverter = null, string $classExp='//', $innerJoinsLeft=false) + public function __construct(ContainerInterface $filterLocator, ManagerRegistry $managerRegistry, ?LoggerInterface $logger = null, ?array $properties = null, ?NameConverterInterface $nameConverter = null, string $classExp='//', $innerJoinsLeft=false) { $this->filterLocator = $filterLocator; $this->classExp = $classExp; diff --git a/tests/Filter/FilterLogicWithAnnotationTest.php b/tests/Filter/FilterLogicWithAnnotationTest.php index 6d08d7a..2314067 100644 --- a/tests/Filter/FilterLogicWithAnnotationTest.php +++ b/tests/Filter/FilterLogicWithAnnotationTest.php @@ -26,8 +26,8 @@ class FilterLogicWithAnnotationTest extends KernelTestCase private $filters; /** @var FilterLogic */ private $filterLogic; - - private Operation $operation; + /** @var Operation */ + private $operation; public function setUp(): void { diff --git a/tests/Filter/FilterToTestAssumptions.php b/tests/Filter/FilterToTestAssumptions.php index 7adbc06..db64683 100644 --- a/tests/Filter/FilterToTestAssumptions.php +++ b/tests/Filter/FilterToTestAssumptions.php @@ -14,7 +14,7 @@ class FilterToTestAssumptions implements FilterInterface { public function getDescription(string $resourceClass): array { - + return []; } public function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, Operation $operation = null, array $context = []): void