Skip to content

Commit

Permalink
Changes for PHP 8.2 (arangodb#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rene Rudnick committed Sep 1, 2023
1 parent 2b12ea6 commit 52ade0b
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 101 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
],
"require": {
"php": ">=5.6.0"
"php": ">=8.0"
},
"autoload": {
"psr-0": {
Expand Down
6 changes: 5 additions & 1 deletion lib/ArangoDBClient/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ class Analyzer
* Analyzer features index
*/
const ENTRY_FEATURES = 'features';


private array $_features;
private array $_properties;
private string $_type;

/**
* Constructs an analyzer
*
Expand Down
8 changes: 3 additions & 5 deletions lib/ArangoDBClient/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class Batch
*/
private $_nextId = 0;


/**
* Constructor for Batch instance. Batch instance by default starts capturing request after initiated.
* To disable this, pass startCapture=>false inside the options array parameter
Expand All @@ -109,16 +108,15 @@ public function __construct(Connection $connection, array $options = [])
$options = array_merge($options, $this->getCursorOptions());
extract($options, EXTR_IF_EXISTS);
$this->_sanitize = $sanitize;
$this->batchSize = $batchSize;

if ($this->batchSize > 0) {
$this->_batchParts = new \SplFixedArray($this->batchSize);
if ($batchSize > 0) {
$this->_batchParts = new \SplFixedArray($batchSize);
}

$this->setConnection($connection);

// set default cursor options. Sanitize is currently the only local one.
$this->_batchPartCursorOptions = [Cursor::ENTRY_SANITIZE => (bool) $this->_sanitize];
$this->_batchPartCursorOptions = [Cursor::ENTRY_SANITIZE => $this->_sanitize];

if ($startCapture === true) {
$this->startCapture();
Expand Down
Loading

0 comments on commit 52ade0b

Please sign in to comment.