Skip to content

Commit 0bcab12

Browse files
author
Alexander Miertsch
authored
Merge pull request #11 from rikgirbes/master
PHP 8 Support
2 parents 128360f + 1048b5b commit 0bcab12

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.2 || ^8.0",
19+
"php": "^8.0",
2020
"event-engine/php-document-store": "^0.8.1",
2121
"event-engine/php-event-store": "^0.3.1",
2222
"event-engine/php-messaging": "^0.2.1"

src/InMemoryConnection.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use EventEngine\Persistence\Exception\TransactionAlreadyStarted;
1515
use EventEngine\Persistence\Exception\TransactionNotStarted;
16+
use ReturnTypeWillChange;
1617

1718
final class InMemoryConnection implements \ArrayAccess, TransactionalConnection
1819
{
@@ -70,7 +71,7 @@ public function rollBack(): void
7071
$this->inTransaction = false;
7172
}
7273

73-
public function offsetSet($key, $value)
74+
#[ReturnTypeWillChange] public function offsetSet($key, $value): void
7475
{
7576
if (null === $key) {
7677
$this->storage[] = $value;
@@ -79,20 +80,20 @@ public function offsetSet($key, $value)
7980
}
8081
}
8182

82-
public function offsetExists($key)
83+
#[\ReturnTypeWillChange] public function offsetExists($key): bool
8384
{
8485
return isset($this->storage[$key]);
8586
}
8687

87-
public function offsetUnset($key)
88+
#[ReturnTypeWillChange] public function offsetUnset($key): void
8889
{
8990
if ($this->inTransaction) {
9091
throw new \RuntimeException('In transaction use roll back');
9192
}
9293
unset($this->storage[$key]);
9394
}
9495

95-
public function &offsetGet($key)
96+
#[ReturnTypeWillChange] public function &offsetGet($key)
9697
{
9798
$ret = null;
9899
if (! $this->offsetExists($key)) {

0 commit comments

Comments
 (0)