Skip to content

Commit 2cdef73

Browse files
committed
Merge branch 'v2.x' into merge-v1.x-into-v2.x-1727875164424
2 parents 20fbbc0 + db06619 commit 2cdef73

File tree

319 files changed

+639
-11098
lines changed

Some content is hidden

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

319 files changed

+639
-11098
lines changed

UPGRADE-2.0.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
UPGRADE FROM 1.x to 2.0
2+
=======================
3+
4+
* The `getServer()` method has been removed from the CommandFailedEvent,
5+
CommandStartedEvent, and CommandSucceededEvent event classes. The `getHost()`
6+
and `getPort()` methods have been added in its place.
7+
* The BSON functions in the `MongoDB\BSON` namespace have been removed in favor
8+
of the `MongoDB\BSON\Document` class.
9+
* The constants `MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE_PREVIEW` and
10+
`MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE_PREVIEW` have been
11+
removed. Use the `ALGORITHM_RANGE` and `QUERY_TYPE_RANGE` instead.
12+
* The `MongoDB\Driver\ReadPreference` class now requires a string value for its
13+
constructor's `$mode` parameter. The integer constants for modes have been
14+
removed along with the `getMode()` method. Use the string constants and
15+
`getModeString()` instead.
16+
* All tentative return types defined in interface and non-final classes are now
17+
fixed and are required in implementing or extending classes.
18+
* `MongoDB\Driver\CursorInterface` now extends `Iterator`, requiring
19+
implementing classes to also implement iterator methods. The return types for
20+
the `key` and `current` methods have been narrowed to the types returned by
21+
cursor instances.
22+
* The `MongoDB\Driver\CursorId` class was removed.
23+
`MongoDB\Driver\Cursor::getId()` and
24+
`MongoDB\Driver\CursorInterface::getId()` now return a `MongoDB\BSON\Int64`
25+
instance.
26+
* The `--with-libbson` and `--with-libmongoc` configure options have been
27+
removed. Use `--with-mongodb-system-libs` instead.
28+
* All classes that previously implemented the `Serializable` interface no
29+
longer implement this interface.
30+
* The constructor of `MongoDB\BSON\UTCDateTime` no longer accepts a `string` or
31+
`float` argument. To pass 64-bit integers on 32-bit platforms, use the
32+
`MongoDB\BSON\Int64` class instead.
33+
* The `--with-openssl-dir` configure option has been removed. If using OpenSSL,
34+
ensure that it is detected by `pkg-config`.
35+
* The `--with-system-ciphers` configure option has been removed. Use
36+
`--enable-mongodb-crypto-system-profile` instead.
37+
* `MongoDB\Driver\Query` removes the following options: `partial` (use
38+
`allowPartialResults` instead), `maxScan`, `modifiers` (use alternative
39+
top-level options instead), `oplogReplay`, and `snapshot`. Support for
40+
negative `limit` values has been removed (use `singleBatch` instead).

bin/update-release-version.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function usage()
1717
to-stable: Mark the current version as stable
1818
to-next-patch-dev: Update to the next patch development version
1919
to-next-minor-dev: Update to the next minor development version
20+
to-next-major-dev: Update to the next major development version
2021
get-version: Print the current version number
2122
2223
EOT;
@@ -167,6 +168,23 @@ function get_next_minor_version(array $versions): array
167168
];
168169
}
169170

171+
function get_next_major_version(array $versions): array
172+
{
173+
$versionComponents = $versions['versionComponents'];
174+
175+
// Increase major version, set other components to 0
176+
$versionComponents[0] += 1;
177+
$versionComponents[1] = 0;
178+
$versionComponents[2] = 0;
179+
$versionComponents[3] = 0;
180+
181+
return [
182+
'version' => get_version_string_from_components($versionComponents) . 'dev',
183+
'stability' => 'devel',
184+
'versionComponents' => $versionComponents,
185+
];
186+
}
187+
170188
function get_next_release_version(array $versions, string $releaseVersion): array
171189
{
172190
$releaseVersion = parse_release_version($releaseVersion);
@@ -244,6 +262,10 @@ function get_next_dev_version(array $versions): array
244262
$newVersion = get_next_minor_version($currentVersion);
245263
break;
246264

265+
case 'to-next-major-dev':
266+
$newVersion = get_next_major_version($currentVersion);
267+
break;
268+
247269
default:
248270
usage();
249271
}

config.m4

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,10 @@ if test "$PHP_MONGODB" != "no"; then
165165
src/BSON/Unserializable.c \
166166
src/BSON/UTCDateTime.c \
167167
src/BSON/UTCDateTimeInterface.c \
168-
src/BSON/functions.c \
169168
src/MongoDB/BulkWrite.c \
170169
src/MongoDB/ClientEncryption.c \
171170
src/MongoDB/Command.c \
172171
src/MongoDB/Cursor.c \
173-
src/MongoDB/CursorId.c \
174172
src/MongoDB/CursorInterface.c \
175173
src/MongoDB/Manager.c \
176174
src/MongoDB/Query.c \
@@ -197,9 +195,7 @@ if test "$PHP_MONGODB" != "no"; then
197195
src/MongoDB/Exception/LogicException.c \
198196
src/MongoDB/Exception/RuntimeException.c \
199197
src/MongoDB/Exception/ServerException.c \
200-
src/MongoDB/Exception/SSLConnectionException.c \
201198
src/MongoDB/Exception/UnexpectedValueException.c \
202-
src/MongoDB/Exception/WriteException.c \
203199
src/MongoDB/Monitoring/CommandFailedEvent.c \
204200
src/MongoDB/Monitoring/CommandStartedEvent.c \
205201
src/MongoDB/Monitoring/CommandSubscriber.c \
@@ -227,22 +223,6 @@ if test "$PHP_MONGODB" != "no"; then
227223
[no])
228224
PHP_MONGODB_VALIDATE_ARG([PHP_MONGODB_SYSTEM_LIBS], [yes no])
229225

230-
PHP_ARG_WITH([libbson],
231-
[whether to use system libbson],
232-
[AS_HELP_STRING([--with-libbson=@<:@yes/no@:>@],
233-
[MongoDB: Use system libbson (deprecated for --with-mongodb-system-libs) [default=no]])],
234-
[no],
235-
[no])
236-
PHP_MONGODB_VALIDATE_ARG([PHP_LIBBSON], [yes no])
237-
238-
PHP_ARG_WITH([libmongoc],
239-
[whether to use system libmongoc],
240-
[AS_HELP_STRING([--with-libmongoc=@<:@yes/no@:>@],
241-
[MongoDB: Use system libmongoc (deprecated for --with-mongodb-system-libs) [default=no]])],
242-
[no],
243-
[no])
244-
PHP_MONGODB_VALIDATE_ARG([PHP_LIBMONGOC], [yes no])
245-
246226
PHP_ARG_WITH([mongodb-client-side-encryption],
247227
[whether to enable client-side encryption],
248228
[AS_HELP_STRING([--with-mongodb-client-side-encryption=@<:@auto/yes/no@:>@],
@@ -251,26 +231,6 @@ if test "$PHP_MONGODB" != "no"; then
251231
[no])
252232
PHP_MONGODB_VALIDATE_ARG([PHP_MONGODB_CLIENT_SIDE_ENCRYPTION], [auto yes no])
253233

254-
if test "$PHP_LIBBSON" != "no"; then
255-
AC_MSG_WARN(Using --with-libbson is deprecated and will be removed in a future version. Please use --with-system-libs instead)
256-
257-
if test "$PHP_LIBMONGOC" = "no"; then
258-
AC_MSG_ERROR(Cannot use system libbson and bundled libmongoc)
259-
fi
260-
261-
PHP_MONGODB_SYSTEM_LIBS="yes"
262-
fi
263-
264-
if test "$PHP_LIBMONGOC" != "no"; then
265-
AC_MSG_WARN(Using --with-libmongoc is deprecated and will be removed in a future version. Please use --with-system-libs instead)
266-
267-
if test "$PHP_LIBBSON" = "no"; then
268-
AC_MSG_ERROR(Cannot use system libmongoc and bundled libbson)
269-
fi
270-
271-
PHP_MONGODB_SYSTEM_LIBS="yes"
272-
fi
273-
274234
PHP_MONGODB_BSON_VERSION_STRING="None"
275235
PHP_MONGODB_MONGOC_VERSION_STRING="None"
276236
PHP_MONGODB_MONGOCRYPT_VERSION_STRING="None"

config.w32

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ if (PHP_MONGODB != "no") {
115115

116116
EXTENSION("mongodb", "php_phongo.c", null, PHP_MONGODB_CFLAGS);
117117
MONGODB_ADD_SOURCES("/src", "phongo_apm.c phongo_bson.c phongo_bson_encode.c phongo_client.c phongo_compat.c phongo_error.c phongo_execute.c phongo_ini.c phongo_log.c phongo_util.c");
118-
MONGODB_ADD_SOURCES("/src/BSON", "Binary.c BinaryInterface.c Document.c Iterator.c DBPointer.c Decimal128.c Decimal128Interface.c Int64.c Javascript.c JavascriptInterface.c MaxKey.c MaxKeyInterface.c MinKey.c MinKeyInterface.c ObjectId.c ObjectIdInterface.c PackedArray.c Persistable.c Regex.c RegexInterface.c Serializable.c Symbol.c Timestamp.c TimestampInterface.c Type.c Undefined.c Unserializable.c UTCDateTime.c UTCDateTimeInterface.c functions.c");
119-
MONGODB_ADD_SOURCES("/src/MongoDB", "BulkWrite.c ClientEncryption.c Command.c Cursor.c CursorId.c CursorInterface.c Manager.c Query.c ReadConcern.c ReadPreference.c Server.c ServerApi.c ServerDescription.c Session.c TopologyDescription.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c");
120-
MONGODB_ADD_SOURCES("/src/MongoDB/Exception", "AuthenticationException.c BulkWriteException.c CommandException.c ConnectionException.c ConnectionTimeoutException.c EncryptionException.c Exception.c ExecutionTimeoutException.c InvalidArgumentException.c LogicException.c RuntimeException.c ServerException.c SSLConnectionException.c UnexpectedValueException.c WriteException.c");
118+
MONGODB_ADD_SOURCES("/src/BSON", "Binary.c BinaryInterface.c Document.c Iterator.c DBPointer.c Decimal128.c Decimal128Interface.c Int64.c Javascript.c JavascriptInterface.c MaxKey.c MaxKeyInterface.c MinKey.c MinKeyInterface.c ObjectId.c ObjectIdInterface.c PackedArray.c Persistable.c Regex.c RegexInterface.c Serializable.c Symbol.c Timestamp.c TimestampInterface.c Type.c Undefined.c Unserializable.c UTCDateTime.c UTCDateTimeInterface.c");
119+
MONGODB_ADD_SOURCES("/src/MongoDB", "BulkWrite.c ClientEncryption.c Command.c Cursor.c CursorInterface.c Manager.c Query.c ReadConcern.c ReadPreference.c Server.c ServerApi.c ServerDescription.c Session.c TopologyDescription.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c");
120+
MONGODB_ADD_SOURCES("/src/MongoDB/Exception", "AuthenticationException.c BulkWriteException.c CommandException.c ConnectionException.c ConnectionTimeoutException.c EncryptionException.c Exception.c ExecutionTimeoutException.c InvalidArgumentException.c LogicException.c RuntimeException.c ServerException.c UnexpectedValueException.c");
121121
MONGODB_ADD_SOURCES("/src/MongoDB/Monitoring", "CommandFailedEvent.c CommandStartedEvent.c CommandSubscriber.c CommandSucceededEvent.c LogSubscriber.c SDAMSubscriber.c Subscriber.c ServerChangedEvent.c ServerClosedEvent.c ServerHeartbeatFailedEvent.c ServerHeartbeatStartedEvent.c ServerHeartbeatSucceededEvent.c ServerOpeningEvent.c TopologyChangedEvent.c TopologyClosedEvent.c TopologyOpeningEvent.c functions.c");
122122
MONGODB_ADD_SOURCES("/src/libmongoc/src/common", PHP_MONGODB_COMMON_SOURCES);
123123
MONGODB_ADD_SOURCES("/src/libmongoc/src/libbson/src/bson", PHP_MONGODB_BSON_SOURCES);

phongo_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
* publishing a release. */
2323

2424
/* clang-format off */
25-
#define PHP_MONGODB_VERSION "1.21.0dev"
25+
#define PHP_MONGODB_VERSION "2.0.0dev"
2626
#define PHP_MONGODB_STABILITY "devel"
27-
#define PHP_MONGODB_VERSION_DESC 1,21,0,0
27+
#define PHP_MONGODB_VERSION_DESC 2,0,0,0
2828
/* clang-format on */
2929

3030
#endif /* PHONGO_VERSION_H */

php_phongo.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
254254
php_phongo_clientencryption_init_ce(INIT_FUNC_ARGS_PASSTHRU);
255255
php_phongo_command_init_ce(INIT_FUNC_ARGS_PASSTHRU);
256256
php_phongo_cursor_init_ce(INIT_FUNC_ARGS_PASSTHRU);
257-
php_phongo_cursorid_init_ce(INIT_FUNC_ARGS_PASSTHRU);
258257
php_phongo_manager_init_ce(INIT_FUNC_ARGS_PASSTHRU);
259258
php_phongo_query_init_ce(INIT_FUNC_ARGS_PASSTHRU);
260259
php_phongo_readconcern_init_ce(INIT_FUNC_ARGS_PASSTHRU);
@@ -274,7 +273,6 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
274273
php_phongo_runtimeexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
275274
php_phongo_serverexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
276275
php_phongo_connectionexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
277-
php_phongo_writeexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
278276

279277
php_phongo_authenticationexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
280278
php_phongo_bulkwriteexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
@@ -284,7 +282,6 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
284282
php_phongo_executiontimeoutexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
285283
php_phongo_invalidargumentexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
286284
php_phongo_logicexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
287-
php_phongo_sslconnectionexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
288285
php_phongo_unexpectedvalueexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
289286

290287
/* Register base APM classes first */

scripts/autotools/libmongoc/CheckSSL.m4

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,6 @@ fi
1919

2020
PHP_MONGODB_VALIDATE_ARG([PHP_MONGODB_SSL], [auto openssl libressl darwin no])
2121

22-
PHP_ARG_WITH([openssl-dir],
23-
[deprecated option for OpenSSL library path],
24-
[AS_HELP_STRING([--with-openssl-dir=@<:@auto/DIR@:>@],
25-
[MongoDB: OpenSSL library path (deprecated for pkg-config) [default=auto]])],
26-
[auto],
27-
[no])
28-
29-
if test "$PHP_OPENSSL_DIR" != "auto"; then
30-
AC_MSG_WARN([Using --with-openssl-dir is deprecated and will be removed in a future version.])
31-
fi
32-
3322
AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
3423
found_openssl="no"
3524
@@ -54,13 +43,10 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
5443
unset OPENSSL_INCDIR
5544
unset OPENSSL_LIBDIR
5645
57-
dnl Use a list of directories from PHP_SETUP_OPENSSL by default.
58-
dnl Support documented "auto" and older, undocumented "yes" options
59-
if test "$PHP_OPENSSL_DIR" = "auto" -o "$PHP_OPENSSL_DIR" = "yes"; then
60-
PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
61-
fi
46+
dnl Use a list of directories from PHP_SETUP_OPENSSL by default.
47+
OPENSSL_SEARCH_PATHS="/usr/local/ssl /usr/local /usr /usr/local/openssl"
6248
63-
for i in $PHP_OPENSSL_DIR; do
49+
for i in $OPENSSL_SEARCH_PATHS; do
6450
if test -r $i/include/openssl/evp.h; then
6551
OPENSSL_INCDIR="$i/include"
6652
fi
@@ -80,7 +66,6 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
8066
[have_crypto_lib="no"],
8167
[$OPENSSL_LIBDIR_LDFLAG])
8268
83-
8469
dnl Check whether OpenSSL >= 1.1.0 is available
8570
PHP_CHECK_LIBRARY([ssl],
8671
[OPENSSL_init_ssl],
@@ -244,25 +229,7 @@ PHP_ARG_ENABLE([mongodb-crypto-system-profile],
244229
[no])
245230
PHP_MONGODB_VALIDATE_ARG([PHP_MONGODB_CRYPTO_SYSTEM_PROFILE], [yes no])
246231

247-
PHP_ARG_WITH([system-ciphers],
248-
[deprecated option for whether to use system crypto profile],
249-
AS_HELP_STRING([--enable-system-ciphers],
250-
[MongoDB: whether to use system crypto profile (deprecated for --enable-mongodb-crypto-system-profile) [default=no]]),
251-
[no],
252-
[no])
253-
254-
dnl Do not validate PHP_SYSTEM_CIPHERS for static builds, since it is also used
255-
dnl by the OpenSSL extension, which checks for values other than "no".
256-
if test "$ext_shared" = "yes"; then
257-
PHP_MONGODB_VALIDATE_ARG([PHP_SYSTEM_CIPHERS], [yes no])
258-
259-
if test "$PHP_SYSTEM_CIPHERS" != "no"; then
260-
AC_MSG_WARN([Using --enable-system-ciphers is deprecated and will be removed in a future version. Please use --enable-mongodb-crypto-system-profile instead])
261-
fi
262-
fi
263-
264-
dnl Also consider the deprecated --enable-system-ciphers option
265-
if test "$PHP_MONGODB_CRYPTO_SYSTEM_PROFILE" = "yes" -o "$PHP_SYSTEM_CIPHERS" = "yes"; then
232+
if test "$PHP_MONGODB_CRYPTO_SYSTEM_PROFILE" = "yes"; then
266233
if test "$PHP_MONGODB_SSL" = "openssl"; then
267234
AC_SUBST(MONGOC_ENABLE_CRYPTO_SYSTEM_PROFILE, 1)
268235
else

src/BSON/Binary.c

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
*/
1616

1717
#include <php.h>
18-
#include <zend_smart_str.h>
1918
#include <ext/standard/base64.h>
20-
#include <ext/standard/php_var.h>
2119
#include <Zend/zend_interfaces.h>
2220

2321
#include "php_phongo.h"
@@ -184,60 +182,6 @@ static PHP_METHOD(MongoDB_BSON_Binary, jsonSerialize)
184182
ADD_ASSOC_STRINGL(return_value, "$type", type, type_len);
185183
}
186184

187-
static PHP_METHOD(MongoDB_BSON_Binary, serialize)
188-
{
189-
php_phongo_binary_t* intern;
190-
zval retval;
191-
php_serialize_data_t var_hash;
192-
smart_str buf = { 0 };
193-
194-
intern = Z_BINARY_OBJ_P(getThis());
195-
196-
PHONGO_PARSE_PARAMETERS_NONE();
197-
198-
array_init_size(&retval, 2);
199-
ADD_ASSOC_STRINGL(&retval, "data", intern->data, intern->data_len);
200-
ADD_ASSOC_LONG_EX(&retval, "type", intern->type);
201-
202-
PHP_VAR_SERIALIZE_INIT(var_hash);
203-
php_var_serialize(&buf, &retval, &var_hash);
204-
smart_str_0(&buf);
205-
PHP_VAR_SERIALIZE_DESTROY(var_hash);
206-
207-
PHONGO_RETVAL_SMART_STR(buf);
208-
209-
smart_str_free(&buf);
210-
zval_ptr_dtor(&retval);
211-
}
212-
213-
static PHP_METHOD(MongoDB_BSON_Binary, unserialize)
214-
{
215-
php_phongo_binary_t* intern;
216-
char* serialized;
217-
size_t serialized_len;
218-
zval props;
219-
php_unserialize_data_t var_hash;
220-
221-
intern = Z_BINARY_OBJ_P(getThis());
222-
223-
PHONGO_PARSE_PARAMETERS_START(1, 1)
224-
Z_PARAM_STRING(serialized, serialized_len)
225-
PHONGO_PARSE_PARAMETERS_END();
226-
227-
PHP_VAR_UNSERIALIZE_INIT(var_hash);
228-
if (!php_var_unserialize(&props, (const unsigned char**) &serialized, (unsigned char*) serialized + serialized_len, &var_hash)) {
229-
zval_ptr_dtor(&props);
230-
phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE, "%s unserialization failed", ZSTR_VAL(php_phongo_binary_ce->name));
231-
232-
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
233-
return;
234-
}
235-
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
236-
237-
php_phongo_binary_init_from_hash(intern, HASH_OF(&props));
238-
zval_ptr_dtor(&props);
239-
}
240-
241185
static PHP_METHOD(MongoDB_BSON_Binary, __serialize)
242186
{
243187
PHONGO_PARSE_PARAMETERS_NONE();
@@ -339,7 +283,7 @@ static HashTable* php_phongo_binary_get_properties(zend_object* object)
339283

340284
void php_phongo_binary_init_ce(INIT_FUNC_ARGS)
341285
{
342-
php_phongo_binary_ce = register_class_MongoDB_BSON_Binary(php_phongo_binary_interface_ce, php_phongo_json_serializable_ce, php_phongo_type_ce, zend_ce_serializable, zend_ce_stringable);
286+
php_phongo_binary_ce = register_class_MongoDB_BSON_Binary(php_phongo_binary_interface_ce, php_phongo_json_serializable_ce, php_phongo_type_ce, zend_ce_stringable);
343287
php_phongo_binary_ce->create_object = php_phongo_binary_create_object;
344288

345289
memcpy(&php_phongo_handler_binary, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));

src/BSON/Binary.stub.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace MongoDB\BSON;
99

10-
final class Binary implements BinaryInterface, \JsonSerializable, Type, \Serializable, \Stringable
10+
final class Binary implements BinaryInterface, \JsonSerializable, Type, \Stringable
1111
{
1212
/**
1313
* @var int
@@ -79,10 +79,6 @@ final public static function __set_state(array $properties): Binary {}
7979

8080
final public function __toString(): string {}
8181

82-
final public function serialize(): string {}
83-
84-
final public function unserialize(string $data): void {}
85-
8682
final public function __unserialize(array $data): void {}
8783

8884
final public function __serialize(): array {}

src/BSON/BinaryInterface.stub.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99

1010
interface BinaryInterface
1111
{
12-
/** @tentative-return-type */
1312
public function getData(): string;
1413

15-
/** @tentative-return-type */
1614
public function getType(): int;
1715

1816
public function __toString(): string;

0 commit comments

Comments
 (0)