arangodb / arangodb-php

PHP ODM for ArangoDB
https://www.arangodb.com
Apache License 2.0
182 stars 46 forks source link

Support PHP 8.1 #290

Closed Sweetchuck closed 1 year ago

Sweetchuck commented 2 years ago
Return type of ArangoDBClient\ConnectionOptions::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Return type of ArangoDBClient\ConnectionOptions::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Return type of ArangoDBClient\ConnectionOptions::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Return type of ArangoDBClient\ConnectionOptions::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Return type of ArangoDBClient\Cursor::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Return type of ArangoDBClient\Cursor::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Return type of ArangoDBClient\Cursor::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Return type of ArangoDBClient\Cursor::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Return type of ArangoDBClient\Cursor::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Geolim4 commented 2 years ago

Can you also fix this btw ?

Return type of ArangoDBClient\Document::jsonSerialize(array $options = []) should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice" in /vendor/triagens/arangodb/lib/ArangoDBClient/Document.php line 789
Sweetchuck commented 2 years ago

That is interesting.

This should fix it. (But it looks like it does not)

https://github.com/Sweetchuck/arangodb-php/blob/issue-290-3.x-php-0801/lib/ArangoDBClient/Document.php#L789-L789

Sweetchuck commented 1 year ago

6 months later: #296