Skip to content

Commit c3243f5

Browse files
Merge pull request #23 from netlogix/fix/php-deprecations
fix: Remove php deprecations
2 parents 02eeb6b + 3a3937d commit c3243f5

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/workflows/functionaltests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
php-version: [ 8.1, 8.2 ]
13+
php-version: [ 8.1, 8.2, 8.3 ]
1414
flow-version: [ 8.3 ]
1515
mysql-version: [5.7]
1616

.github/workflows/unittests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
php-version: [ 8.1, 8.2 ]
13+
php-version: [ 8.1, 8.2, 8.3 ]
1414
flow-version: [ 8.3 ]
1515

1616
env:

Classes/Domain/Model/ResourceProxy.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,37 @@ public function setPayload($payload = [])
4848
/**
4949
* @inheritdoc
5050
*/
51-
public function offsetExists($propertyName)
51+
public function offsetExists(mixed $offset): bool
5252
{
53-
return $this->type->getPropertyDefinition($propertyName) !== Type::PROPERTY_UNDEFINED;
53+
return $this->type->getPropertyDefinition($offset) !== Type::PROPERTY_UNDEFINED;
5454
}
5555

5656
/**
5757
* @inheritdoc
5858
*/
59-
public function offsetGet($propertyName)
59+
public function offsetGet(mixed $offset): mixed
6060
{
61-
switch ($this->type->getPropertyDefinition($propertyName)) {
61+
switch ($this->type->getPropertyDefinition($offset)) {
6262
case Type::PROPERTY_ATTRIBUTE:
63-
return $this->getAttribute($propertyName);
63+
return $this->getAttribute($offset);
6464
case Type::PROPERTY_SINGLE_RELATIONSHIP:
65-
return $this->getSingleRelationship($propertyName);
65+
return $this->getSingleRelationship($offset);
6666
case Type::PROPERTY_COLLECTION_RELATIONSHIP:
67-
return $this->getCollectionRelationship($propertyName);
67+
return $this->getCollectionRelationship($offset);
6868
}
6969
}
7070

7171
/**
7272
* @inheritdoc
7373
*/
74-
public function offsetSet($propertyName, $value)
74+
public function offsetSet(mixed $offset, mixed $value): void
7575
{
7676
}
7777

7878
/**
7979
* @inheritdoc
8080
*/
81-
public function offsetUnset($propertyName)
81+
public function offsetUnset(mixed $offset): void
8282
{
8383
}
8484

Classes/Domain/Model/ResourceProxyIterator.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
namespace Netlogix\JsonApiOrg\Consumer\Domain\Model;
55

6+
use Generator;
67
use Neos\Cache\Frontend\VariableFrontend;
78
use Neos\Flow\Cache\CacheManager;
89
use Neos\Flow\Utility\Now;
@@ -85,9 +86,9 @@ public function withJsonResult(array $jsonResult): self
8586
}
8687

8788
/**
88-
* @return \Generator
89+
* @return Generator
8990
*/
90-
public function getIterator()
91+
public function getIterator(): Generator
9192
{
9293
yield from $this->data;
9394
}
@@ -100,7 +101,7 @@ public function getArrayCopy(): array
100101
/**
101102
* @return int
102103
*/
103-
public function count()
104+
public function count(): int
104105
{
105106
if (isset($this->jsonResult)
106107
&& array_key_exists('meta', $this->jsonResult)

0 commit comments

Comments
 (0)