Skip to content

Commit c1e90b5

Browse files
committed
PHPLIB-360: Make ChangeStream::CURSOR_NOT_FOUND private
1 parent 411f612 commit c1e90b5

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

UPGRADE-2.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ UPGRADE FROM 1.x to 2.0
33

44
* Classes in the namespace `MongoDB\Operation\` are `final`.
55
* All methods in interfaces and classes now define a return type.
6+
* The `MongoDB\ChangeStream::CURSOR_NOT_FOUND` constant is now private.
67

78
GridFS
89
------

psalm-baseline.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,6 @@
179179
count($queriesOrArrayOfQueries[0]) > 0]]></code>
180180
</RedundantConditionGivenDocblockType>
181181
</file>
182-
<file src="src/ChangeStream.php">
183-
<DeprecatedConstant>
184-
<code><![CDATA[self::CURSOR_NOT_FOUND]]></code>
185-
</DeprecatedConstant>
186-
</file>
187182
<file src="src/Client.php">
188183
<DeprecatedInterface>
189184
<code><![CDATA[DatabaseInfoIterator]]></code>

src/ChangeStream.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@
4343
*/
4444
class ChangeStream implements Iterator
4545
{
46-
/**
47-
* @deprecated 1.4
48-
* @todo make this constant private in 2.0 (see: PHPLIB-360)
49-
*/
50-
public const CURSOR_NOT_FOUND = 43;
46+
private const CURSOR_NOT_FOUND = 43;
5147

5248
private const RESUMABLE_ERROR_CODES = [
5349
6, // HostUnreachable

0 commit comments

Comments
 (0)