forked from arangodb/arangodb-php
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCHANGELOG
195 lines (144 loc) · 7.8 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
Release notes for the ArangoDB-PHP driver 3.0.7
===============================================
This version of the driver is compatible with ArangoDB 3.0.7
It is not compatible to earlier versions of ArangoDB (i.e. 2.x).
Please use ones of the `2.x` branches of the driver for 2.x-compatibility.
Changed functionality
=====================
Batch processing
----------------
Added an option to pre-define a batch size for a batch.
This results in the driver using an SplFixedArray for the storage of the batch parts,
which in turn results to a bit (5% to 15%) more performance in batch processing.
The option is called batchSize and accepts an integer.
Example:
$batch = new Batch($this->connection, ['batchSize' => 10000]);
Bug fixes
=========
Do to the many API changes in version 3 of ArangoDB, the driver had to go through a lot of changes too.
This resulted in some inconsistencies in its functionality. Version 3.0.7 has hopefully dealt with them all.
If there should be any more left, please create an issue to report it.
============================================================================================================
Release notes for the ArangoDB-PHP driver 3.0
=============================================
This version of the driver is compatible with ArangoDB 3.0.
It is not compatible to earlier versions of ArangoDB (i.e. 2.x).
Please use ones of the `2.x` branches of the driver for 2.x-compatibility.
Changed functionality
=====================
User management
---------------
The user management APIs in class `UserHandler` have changed slightly. The methods for adding,
replacing and updating users had an optional parameter named `$options`, which did nothing.
This parameter has been removed.
The API methods simplify to:
- UserHandler::addUser($username, $passwd = null, $active = null, $extra = null, $options = array())
- UserHandler::replaceUser($username, $passwd = null, $active = null, $extra = null, $options = array())
- UserHandler::updateUser($username, $passwd = null, $active = null, $extra = null, $options = array())
- UserHandler::addUser($username, $passwd = null, $active = null, $extra = null)
- UserHandler::replaceUser($username, $passwd = null, $active = null, $extra = null)
- UserHandler::updateUser($username, $passwd = null, $active = null, $extra = null)
Note that when adding a new user via the `addUser()` method, the new user will now be given
access permissions for the current database the PHP driver is connected to.
User permissions can be adjusted manually by using the following new methods of the
`UserHandler` class:
- UserHandler::grantPermissions($username, $databaseName)
- UserHandler::revokePermissions($username, $databaseName)
Unsupported functionality
=========================
Cap constraints
---------------
Support for cap constraints has been discontinued on the 3.0 version of ArangoDB.
Therefore, the following methods have also been removed from the PHP driver in
the 3.0 branch:
- CollectionHandler::createCapConstraint($collectionId, $size)
- CollectionHandler::first($collectionId, $count = null)
- CollectionHandler::last($collectionId, $count = null)
Graph functions
---------------
The ArangoDB PHP driver provided PHP wrapper methods for common graph functions
that were implemented server-side. When one of these wrapper methods was called,
the PHP driver assembled an AQL query that called the equivalent graph AQL functions
on the server. The driver has provided some extra post-filtering options for some
of the graph functions, but for others it only provided a subset of the features
available server-side.
With ArangoDB 3.0, the graph functionality on the server-side has changed: the
previously available AQL graph functions that were called by the PHP driver are
not available anymore in 3.0. This affects the following previously existing
methods of the PHP driver's `GraphHandler` class, which are now gone in 3.0:
- GraphHandler::getNeighborVertices($graph, $vertexExample, $options = array())
- GraphHandler::getConnectedEdges($graph, $vertexId, $options = array())
- GraphHandler::getVertices($graph, $options = array())
- GraphHandler::getEdges($graph, $options = array())
- GraphHandler::getPaths($graph, $options = array())
- GraphHandler::getShortestPaths($graph, $startVertexExample = array(), $endVertexExample = array(), $options = array())
- GraphHandler::getDistanceTo($graph, $startVertexExample = null, $endVertexExample = null, $options = array())
- GraphHandler::getCommonNeighborVertices($graph, $vertex1Example = null, $vertex2Example = null, $options1 = array(),$options2 = array())
- GraphHandler::getCommonProperties($graph, $vertex1Example= null, $vertex2Example = null, $options = array())
- GraphHandler::getAbsoluteEccentricity($graph, $vertexExample = null, $options = array())
- GraphHandler::getEccentricity($graph, $options = array())
- GraphHandler::getAbsoluteCloseness($graph, $vertexExample = null, $options = array())
- GraphHandler::getCloseness($graph, $options = array())
- GraphHandler::getAbsoluteBetweenness($graph, $options = array())
- GraphHandler::getBetweenness($graph, $options = array())
- GraphHandler::getRadius($graph, $options = array())
- GraphHandler::getDiameter($graph, $options = array())
Most of these methods can be emulated by issuing an AQL query from the PHP driver.
AQL provides provides blocks for computing the vertices, connected edges, and paths
in a graph or just dedicated collections. As a bonus, by using AQL queries one is
not limited to the subset of the functionality that was available in the "old"
graph functions' interfaces, but can use the full functionality and composability
of AQL.
Custom queues
-------------
"Custom queues" were an undocumented, experimental feature in later versions
of the 2.x driver. Its purpose was to send requests to dedicated processing
queues on the server. This functionality has been removed from the 3.0 ArangoDB
server and the 3.0 driver.
Due to that the following undocumented methods have been removed from the
PHP driver:
- Handler::enableCustomQueue($queueName, $count = null)
- Handler::disableCustomQueue()
- Connection::enableCustomQueue($queueName, $count = null)
- Connection::disableCustomQueue()
Client versioning
-----------------
The client-side versioning feature was also removed from the driver in version
3.0. The versioning feature allowed sending the HTTP header `X-Arango-Version`
with the desired version number for all requests made from the driver. The
ArangoDB server interpreted the value of this HTTP header at some endpoints and
returned result structures matching the ones from older versions of ArangoDB.
This feature was abandoned on the server-side in 3.0 so the versioning was
removed from the driver as well. This also means the following methods have
been removed from the driver's `Connection` class.
- Connection::getVersion()
- Connection::getClientVersion()
Changed functionality
=====================
When replacing edges via the `EdgeHandler::replace()` method, it is now
required to specify both the `_from` and `_to` values of the replacing edge.
If either attribute is missing or invalid, the replace operation will fail
with an error `invalid edge attribute` on the server-side.
That means the following may not work:
```php
$edgeHandler = new EdgeHandler($connection);
$edge = new Edge();
$edge->set("_id", $idOfExistingEdge);
/* set some other edge attributes */
...
$result = $edgeHandler->replace($edge);
```
until at least `_from` and `_to` are also set via the `setFrom()` and `setTo()`
methods:
```php
$edgeHandler = new EdgeHandler($connection);
$edge = new Edge();
$edge->set("_id", $idOfExistingEdge);
/* set some other edge attributes */
...
$edge->setFrom($fromHandle);
$edge->setTo($toHandle);
$result = $edgeHandler->replace($edge);
```
Note that this affects only the `replace()` and `replaceById()` methods and
not `update()` nor `updateById()`.