Skip to content

Commit aabe19a

Browse files
authored
Merge pull request arangodb#198 from frankmayer/devel
Release 3.0.7
2 parents 3a08e95 + 4ead8a2 commit aabe19a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2633
-2734
lines changed

CHANGELOG

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
Release notes for the ArangoDB-PHP driver 3.0.7
2+
===============================================
3+
4+
This version of the driver is compatible with ArangoDB 3.0.7
5+
It is not compatible to earlier versions of ArangoDB (i.e. 2.x).
6+
Please use ones of the `2.x` branches of the driver for 2.x-compatibility.
7+
8+
Changed functionality
9+
=====================
10+
11+
Batch processing
12+
----------------
13+
14+
Added an option to pre-define a batch size for a batch.
15+
This results in the driver using an SplFixedArray for the storage of the batch parts,
16+
which in turn results to a bit (5% to 15%) more performance in batch processing.
17+
18+
The option is called batchSize and accepts an integer.
19+
20+
Example:
21+
$batch = new Batch($this->connection, ['batchSize' => 10000]);
22+
23+
24+
Bug fixes
25+
=========
26+
27+
Do to the many API changes in version 3 of ArangoDB, the driver had to go through a lot of changes too.
28+
This resulted in some inconsistencies in its functionality. Version 3.0.7 has hopefully dealt with them all.
29+
If there should be any more left, please create an issue to report it.
30+
31+
32+
============================================================================================================
33+
34+
135
Release notes for the ArangoDB-PHP driver 3.0
236
=============================================
337

lib/triagens/ArangoDb/AdminHandler.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AdminHandler extends
2828
/**
2929
* details for server version
3030
*/
31-
const OPTION_DETAILS = "details";
31+
const OPTION_DETAILS = 'details';
3232

3333
/**
3434
* Get the server version
@@ -133,9 +133,7 @@ public function getServerLog($options = array())
133133
{
134134
$url = UrlHelper::appendParamsUrl(Urls::URL_ADMIN_LOG, $options);
135135
$response = $this->getConnection()->get($url);
136-
$data = $response->getJson();
137-
138-
return $data;
136+
return $response->getJson();
139137
}
140138

141139

@@ -165,12 +163,12 @@ public function flushServerModuleCache()
165163
*
166164
* @throws Exception
167165
*
168-
* @return array
166+
* @return bool
169167
* @since 1.2
170168
*/
171169
public function reloadServerRouting()
172170
{
173-
$this->getConnection()->POST(Urls::URL_ADMIN_ROUTING_RELOAD, '');
171+
$this->getConnection()->post(Urls::URL_ADMIN_ROUTING_RELOAD, '');
174172

175173
return true;
176174
}
@@ -202,9 +200,7 @@ public function getServerStatistics()
202200
{
203201
$url = UrlHelper::appendParamsUrl(Urls::URL_ADMIN_STATISTICS, array());
204202
$response = $this->getConnection()->get($url);
205-
$data = $response->getJson();
206-
207-
return $data;
203+
return $response->getJson();
208204
}
209205

210206

@@ -237,8 +233,6 @@ public function getServerStatisticsDescription($options = array())
237233
{
238234
$url = UrlHelper::appendParamsUrl(Urls::URL_ADMIN_STATISTICS_DESCRIPTION, $options);
239235
$response = $this->getConnection()->get($url);
240-
$data = $response->getJson();
241-
242-
return $data;
236+
return $response->getJson();
243237
}
244238
}

lib/triagens/ArangoDb/AqlUserFunction.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class AqlUserFunction
5555
*
5656
* @var Connection
5757
*/
58-
private $_connection = null;
58+
private $_connection;
5959

6060
/**
6161
* The transaction's attributes.
@@ -139,9 +139,7 @@ public function register($name = null, $code = null)
139139
Urls::URL_AQL_USER_FUNCTION,
140140
$this->getConnection()->json_encode_wrapper($attributes)
141141
);
142-
$responseArray = $response->getJson();
143-
144-
return $responseArray;
142+
return $response->getJson();
145143
}
146144

147145

@@ -161,7 +159,7 @@ public function register($name = null, $code = null)
161159
*/
162160
public function unregister($name = null, $namespace = false)
163161
{
164-
if (is_null($name)) {
162+
if (null === $name) {
165163
$name = $this->getName();
166164
}
167165

@@ -172,9 +170,7 @@ public function unregister($name = null, $namespace = false)
172170
}
173171

174172
$response = $this->_connection->delete($url);
175-
$responseArray = $response->getJson();
176-
177-
return $responseArray;
173+
return $response->getJson();
178174
}
179175

180176

@@ -192,14 +188,12 @@ public function unregister($name = null, $namespace = false)
192188
public function getRegisteredUserFunctions($namespace = null)
193189
{
194190
$url = UrlHelper::buildUrl(Urls::URL_AQL_USER_FUNCTION, array());
195-
if (!is_null($namespace)) {
191+
if (null !== $namespace) {
196192
$url = UrlHelper::appendParamsUrl($url, array('namespace' => $namespace));
197193
}
198194
$response = $this->_connection->get($url);
199195

200-
$responseArray = $response->getJson();
201-
202-
return $responseArray;
196+
return $response->getJson();
203197
}
204198

205199

lib/triagens/ArangoDb/Autoloader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Autoloader
2727
*
2828
* @var string
2929
*/
30-
private static $libDir = null;
30+
private static $libDir;
3131

3232
/**
3333
* Class file extension
@@ -44,7 +44,7 @@ public static function init()
4444
{
4545
self::checkEnvironment();
4646

47-
self::$libDir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
47+
self::$libDir = __DIR__ . DIRECTORY_SEPARATOR;
4848

4949
spl_autoload_register(__NAMESPACE__ . '\Autoloader::load');
5050
}
@@ -88,7 +88,7 @@ private static function checkEnvironment()
8888
{
8989
list($major, $minor) = explode('.', phpversion());
9090

91-
if ((int) $major < 5 or ((int) $major === 5 && (int) $minor < 3)) {
91+
if ((int) $major < 5 || ((int) $major === 5 && (int) $minor < 3)) {
9292
throw new ClientException('Incompatible PHP environment. Expecting PHP 5.3 or higher');
9393
}
9494
}

0 commit comments

Comments
 (0)