diff --git a/.github/workflows/functionaltests.yml b/.github/workflows/functionaltests.yml index 9937562..860019c 100644 --- a/.github/workflows/functionaltests.yml +++ b/.github/workflows/functionaltests.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [ 8.1, 8.2 ] + php-version: [ 8.1, 8.2, 8.3 ] flow-version: [ 8.3 ] mysql-version: [5.7] diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index ff99b5d..45daa51 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [ 8.1, 8.2 ] + php-version: [ 8.1, 8.2, 8.3 ] flow-version: [ 8.3 ] env: diff --git a/Classes/Domain/Model/ResourceProxy.php b/Classes/Domain/Model/ResourceProxy.php index e920d7f..b04e727 100644 --- a/Classes/Domain/Model/ResourceProxy.php +++ b/Classes/Domain/Model/ResourceProxy.php @@ -48,37 +48,37 @@ public function setPayload($payload = []) /** * @inheritdoc */ - public function offsetExists($propertyName) + public function offsetExists(mixed $offset): bool { - return $this->type->getPropertyDefinition($propertyName) !== Type::PROPERTY_UNDEFINED; + return $this->type->getPropertyDefinition($offset) !== Type::PROPERTY_UNDEFINED; } /** * @inheritdoc */ - public function offsetGet($propertyName) + public function offsetGet(mixed $offset): mixed { - switch ($this->type->getPropertyDefinition($propertyName)) { + switch ($this->type->getPropertyDefinition($offset)) { case Type::PROPERTY_ATTRIBUTE: - return $this->getAttribute($propertyName); + return $this->getAttribute($offset); case Type::PROPERTY_SINGLE_RELATIONSHIP: - return $this->getSingleRelationship($propertyName); + return $this->getSingleRelationship($offset); case Type::PROPERTY_COLLECTION_RELATIONSHIP: - return $this->getCollectionRelationship($propertyName); + return $this->getCollectionRelationship($offset); } } /** * @inheritdoc */ - public function offsetSet($propertyName, $value) + public function offsetSet(mixed $offset, mixed $value): void { } /** * @inheritdoc */ - public function offsetUnset($propertyName) + public function offsetUnset(mixed $offset): void { } diff --git a/Classes/Domain/Model/ResourceProxyIterator.php b/Classes/Domain/Model/ResourceProxyIterator.php index 0ee3a25..fdd8ebf 100644 --- a/Classes/Domain/Model/ResourceProxyIterator.php +++ b/Classes/Domain/Model/ResourceProxyIterator.php @@ -3,6 +3,7 @@ namespace Netlogix\JsonApiOrg\Consumer\Domain\Model; +use Generator; use Neos\Cache\Frontend\VariableFrontend; use Neos\Flow\Cache\CacheManager; use Neos\Flow\Utility\Now; @@ -85,9 +86,9 @@ public function withJsonResult(array $jsonResult): self } /** - * @return \Generator + * @return Generator */ - public function getIterator() + public function getIterator(): Generator { yield from $this->data; } @@ -100,7 +101,7 @@ public function getArrayCopy(): array /** * @return int */ - public function count() + public function count(): int { if (isset($this->jsonResult) && array_key_exists('meta', $this->jsonResult)