intelephense
1.14.41.16.1
lib/stub/mongodb/Manager.phplib/stub/mongodb/Manager.php+29−14
Index: package/lib/stub/mongodb/Manager.php
===================================================================
--- package/lib/stub/mongodb/Manager.php
+++ package/lib/stub/mongodb/Manager.php
@@ -2,15 +2,15 @@
namespace MongoDB\Driver;
use MongoDB\Driver\Exception\AuthenticationException;
+use MongoDB\Driver\Exception\BulkWriteCommandException;
use MongoDB\Driver\Exception\BulkWriteException;
use MongoDB\Driver\Exception\ConnectionException;
use MongoDB\Driver\Exception\Exception;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\RuntimeException;
use MongoDB\Driver\Exception\WriteConcernException;
-use MongoDB\Driver\Exception\WriteException;
use MongoDB\Driver\Monitoring\Subscriber;
/**
* The MongoDB\Driver\Manager is the main entry point to the extension. It is responsible for maintaining connections to MongoDB (be it standalone server, replica set, or sharded cluster).
@@ -47,46 +47,61 @@
* Execute one or more write operations
* @link https://php.net/manual/en/mongodb-driver-manager.executebulkwrite.php
* @param string $namespace A fully qualified namespace (databaseName.collectionName)
* @param BulkWrite $bulk The MongoDB\Driver\BulkWrite to execute.
- * @param array|WriteConcern|null $options WriteConcern type for backwards compatibility
+ * @param array|null $options WriteConcern type for backwards compatibility
* @throws InvalidArgumentException on argument parsing errors.
* @throws ConnectionException if connection to the server fails for other then authentication reasons
* @throws AuthenticationException if authentication is needed and fails
* @throws BulkWriteException on any write failure
* @throws RuntimeException on other errors (invalid command, command arguments, ...)
* @since 1.4.0 added $options argument
*/
- final public function executeBulkWrite(string $namespace, BulkWrite $bulk, array|WriteConcern|null $options = null): WriteResult {}
+ final public function executeBulkWrite(string $namespace, BulkWrite $bulk, array|null $options = null): WriteResult {}
/**
+ * Execute write operations using the bulkWrite command
+ * @link https://php.net/manual/en/mongodb-driver-server.executebulkwritecommand.php
+ * @param BulkWriteCommand $bulkWriteCommand The write(s) to execute.
+ * @param array|null $options
+ * @throws BulkWriteCommandException on any write failure (e.g. write error, failure to apply a write concern).
+ * @throws InvalidArgumentException on argument parsing errors.
+ * @throws ConnectionException if connection to the server fails (for reasons other than authentication).
+ * @throws AuthenticationException if authentication is needed and fails.
+ * @throws RuntimeException on other errors.
+ * @return BulkWriteCommandResult
+ * @since 2.1.0
+ */
+ final public function executeBulkWriteCommand(BulkWriteCommand $bulkWriteCommand, ?array $options = null): BulkWriteCommandResult {}
+
+ /**
* @link https://php.net/manual/en/mongodb-driver-manager.executecommand.php
* @param string $db The name of the database on which to execute the command.
* @param Command $command The command document.
- * @param array|ReadPreference|null $options ReadPreference type for backwards compatibility
+ * @param array|null $options ReadPreference type for backwards compatibility
* @throws Exception
* @throws AuthenticationException if authentication is needed and fails
* @throws ConnectionException if connection to the server fails for other then authentication reasons
* @throws RuntimeException on other errors (invalid command, command arguments, ...)
- * @throws WriteException on Write Error
+ * @throws BulkWriteException on Write Error
* @throws WriteConcernException on Write Concern failure
* @since 1.4.0 added $options argument
*/
- final public function executeCommand(string $db, Command $command, array|ReadPreference|null $options = null): Cursor {}
+ final public function executeCommand(string $db, Command $command, array|null $options = null): CursorInterface {}
/**
* Execute a MongoDB query
* @link https://php.net/manual/en/mongodb-driver-manager.executequery.php
* @param string $namespace A fully qualified namespace (databaseName.collectionName)
* @param Query $query A MongoDB\Driver\Query to execute.
- * @param array|ReadPreference|null $options ReadPreference type for backwards compatibility
+ * @param array|null $options ReadPreference type for backwards compatibility
* @throws Exception
* @throws AuthenticationException if authentication is needed and fails
* @throws ConnectionException if connection to the server fails for other then authentication reasons
* @throws RuntimeException on other errors (invalid command, command arguments, ...)
* @since 1.4.0 added $options argument
*/
- final public function executeQuery(string $namespace, Query $query, array|ReadPreference|null $options = null): Cursor {}
+ final public function executeQuery(string $namespace, Query $query, array|null $options = null): CursorInterface {}
/**
* @link https://php.net/manual/en/mongodb-driver-manager.executereadcommand.php
* @param string $db The name of the database on which to execute the command that reads.
@@ -95,13 +110,13 @@
* @throws Exception
* @throws AuthenticationException if authentication is needed and fails
* @throws ConnectionException if connection to the server fails for other then authentication reasons
* @throws RuntimeException on other errors (invalid command, command arguments, ...)
- * @throws WriteException on Write Error
+ * @throws BulkWriteException on Write Error
* @throws WriteConcernException on Write Concern failure
* @since 1.4.0
*/
- final public function executeReadCommand(string $db, Command $command, ?array $options = null): Cursor {}
+ final public function executeReadCommand(string $db, Command $command, ?array $options = null): CursorInterface {}
/**
* @link https://php.net/manual/en/mongodb-driver-manager.executereadwritecommand.php
* @param string $db The name of the database on which to execute the command that reads.
@@ -110,13 +125,13 @@
* @throws Exception
* @throws AuthenticationException if authentication is needed and fails
* @throws ConnectionException if connection to the server fails for other then authentication reasons
* @throws RuntimeException on other errors (invalid command, command arguments, ...)
- * @throws WriteException on Write Error
+ * @throws BulkWriteException on Write Error
* @throws WriteConcernException on Write Concern failure
* @since 1.4.0
*/
- final public function executeReadWriteCommand(string $db, Command $command, ?array $options = null): Cursor {}
+ final public function executeReadWriteCommand(string $db, Command $command, ?array $options = null): CursorInterface {}
/**
* @link https://php.net/manual/en/mongodb-driver-manager.executewritecommand.php
* @param string $db The name of the database on which to execute the command that writes.
@@ -125,13 +140,13 @@
* @throws Exception
* @throws AuthenticationException if authentication is needed and fails
* @throws ConnectionException if connection to the server fails for other then authentication reasons
* @throws RuntimeException on other errors (invalid command, command arguments, ...)
- * @throws WriteException on Write Error
+ * @throws BulkWriteException on Write Error
* @throws WriteConcernException on Write Concern failure
* @since 1.4.0
*/
- final public function executeWriteCommand(string $db, Command $command, ?array $options = null): Cursor {}
+ final public function executeWriteCommand(string $db, Command $command, ?array $options = null): CursorInterface {}
/**
* Return the encryptedFieldsMap auto encryption option for the Manager
* @link https://www.php.net/manual/en/mongodb-driver-manager.getencryptedfieldsmap.php