Skip to content

Commit

Permalink
Issue #290 - Support PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweetchuck committed Mar 30, 2022
1 parent 00e25f3 commit 27c918f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ matrix:
include:
- php: '7.4'
- php: '8.0'
- php: '8.1'

before_script:
- chmod 777 ./tests/travis/setup_arangodb.sh
Expand Down
4 changes: 4 additions & 0 deletions lib/ArangoDBClient/ConnectionOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ public function getAll()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->_values[$offset] = $value;
Expand All @@ -319,6 +320,7 @@ public function offsetSet($offset, $value)
*
* @return bool - true if option exists, false otherwise
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->_values[$offset]);
Expand All @@ -333,6 +335,7 @@ public function offsetExists($offset)
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->_values[$offset]);
Expand All @@ -348,6 +351,7 @@ public function offsetUnset($offset)
*
* @return mixed - value of option, will throw if option is not set
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
if (!array_key_exists($offset, $this->_values)) {
Expand Down
5 changes: 5 additions & 0 deletions lib/ArangoDBClient/Cursor.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ public function getAll()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
$this->_position = 0;
Expand All @@ -334,6 +335,7 @@ public function rewind()
*
* @return array - the current result row as an assoc array
*/
#[\ReturnTypeWillChange]
public function current()
{
return $this->_result[$this->_position];
Expand All @@ -345,6 +347,7 @@ public function current()
*
* @return int - the current result row index
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->_position;
Expand All @@ -356,6 +359,7 @@ public function key()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
++$this->_position;
Expand All @@ -371,6 +375,7 @@ public function next()
* @throws Exception
* @return bool - true if the cursor can be advanced further, false if cursor is at end
*/
#[\ReturnTypeWillChange]
public function valid()
{
if ($this->_position <= $this->_length - 1) {
Expand Down
1 change: 1 addition & 0 deletions lib/ArangoDBClient/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ public function getRevision()
*
* @return array - array of all document attributes/values
*/
#[\ReturnTypeWillChange]
public function jsonSerialize(array $options = [])
{
return $this->getAll($options);
Expand Down
2 changes: 1 addition & 1 deletion tests/.phpunit.result.cache

Large diffs are not rendered by default.

0 comments on commit 27c918f

Please sign in to comment.