Skip to content

Commit 70c092f

Browse files
committed
PHPC-465: Remove WriteConcernException and WriteErrorException
These exceptions were only used by the single write methods.
1 parent b5f5216 commit 70c092f

File tree

7 files changed

+1
-173
lines changed

7 files changed

+1
-173
lines changed

config.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ if test "$MONGODB" != "no"; then
181181
src/MongoDB/Exception/ExecutionTimeoutException.c \
182182
src/MongoDB/Exception/ConnectionTimeoutException.c \
183183
src/MongoDB/Exception/WriteException.c \
184-
src/MongoDB/Exception/WriteConcernException.c \
185-
src/MongoDB/Exception/WriteErrorException.c \
186184
src/MongoDB/Exception/BulkWriteException.c \
187185
";
188186

config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if (PHP_MONGODB != "no") {
1010
ADD_SOURCES(configure_module_dirname + "/src", "bson.c", "mongodb");
1111
ADD_SOURCES(configure_module_dirname + "/src/BSON", "Type.c Unserializable.c Serializable.c Persistable.c Binary.c Javascript.c MaxKey.c MinKey.c ObjectID.c Regex.c Timestamp.c UTCDateTime.c", "mongodb");
1212
ADD_SOURCES(configure_module_dirname + "/src/MongoDB", "Command.c Cursor.c CursorId.c Manager.c Query.c ReadPreference.c Server.c BulkWrite.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c", "mongodb");
13-
ADD_SOURCES(configure_module_dirname + "/src/MongoDB/Exception", "Exception.c LogicException.c RuntimeException.c UnexpectedValueException.c InvalidArgumentException.c ConnectionException.c AuthenticationException.c SSLConnectionException.c ExecutionTimeoutException.c ConnectionTimeoutException.c WriteException.c WriteConcernException.c WriteErrorException.c BulkWriteException.c", "mongodb");
13+
ADD_SOURCES(configure_module_dirname + "/src/MongoDB/Exception", "Exception.c LogicException.c RuntimeException.c UnexpectedValueException.c InvalidArgumentException.c ConnectionException.c AuthenticationException.c SSLConnectionException.c ExecutionTimeoutException.c ConnectionTimeoutException.c WriteException.c BulkWriteException.c", "mongodb");
1414
ADD_SOURCES(configure_module_dirname + "/src/contrib/", "php-ssl.c", "mongodb");
1515
ADD_SOURCES(configure_module_dirname + "/src/libbson/src/yajl", "yajl_version.c yajl.c yajl_encode.c yajl_lex.c yajl_parser.c yajl_buf.c yajl_tree.c yajl_alloc.c yajl_gen.c", "mongodb");
1616
ADD_SOURCES(configure_module_dirname + "/src/libbson/src/bson", "bcon.c bson.c bson-atomic.c bson-clock.c bson-context.c bson-error.c bson-iter.c bson-iso8601.c bson-json.c bson-keys.c bson-md5.c bson-memory.c bson-oid.c bson-reader.c bson-string.c bson-timegm.c bson-utf8.c bson-value.c bson-version-functions.c bson-writer.c", "mongodb");

php_phongo.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ zend_class_entry* phongo_exception_from_phongo_domain(php_phongo_error_domain_t
100100
return php_phongo_runtimeexception_ce;
101101
case PHONGO_ERROR_WRITE_FAILED:
102102
return php_phongo_bulkwriteexception_ce;
103-
case PHONGO_ERROR_WRITE_SINGLE_FAILED:
104-
return php_phongo_writeerrorexception_ce;
105-
case PHONGO_ERROR_WRITECONCERN_FAILED:
106-
return php_phongo_writeconcernexception_ce;
107103
case PHONGO_ERROR_CONNECTION_FAILED:
108104
return php_phongo_connectionexception_ce;
109105
}
@@ -2208,8 +2204,6 @@ PHP_MINIT_FUNCTION(mongodb)
22082204
PHP_MINIT(AuthenticationException)(INIT_FUNC_ARGS_PASSTHRU);
22092205
PHP_MINIT(SSLConnectionException)(INIT_FUNC_ARGS_PASSTHRU);
22102206
PHP_MINIT(WriteException)(INIT_FUNC_ARGS_PASSTHRU);
2211-
PHP_MINIT(WriteConcernException)(INIT_FUNC_ARGS_PASSTHRU);
2212-
PHP_MINIT(WriteErrorException)(INIT_FUNC_ARGS_PASSTHRU);
22132207
PHP_MINIT(BulkWriteException)(INIT_FUNC_ARGS_PASSTHRU);
22142208
PHP_MINIT(ExecutionTimeoutException)(INIT_FUNC_ARGS_PASSTHRU);
22152209
PHP_MINIT(ConnectionTimeoutException)(INIT_FUNC_ARGS_PASSTHRU);

php_phongo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ typedef enum {
7373
PHONGO_ERROR_RUNTIME = 2,
7474
PHONGO_ERROR_UNEXPECTED_VALUE = 8,
7575
PHONGO_ERROR_MONGOC_FAILED = 3,
76-
PHONGO_ERROR_WRITE_SINGLE_FAILED = 4,
7776
PHONGO_ERROR_WRITE_FAILED = 5,
78-
PHONGO_ERROR_WRITECONCERN_FAILED = 6,
7977
PHONGO_ERROR_CONNECTION_FAILED = 7,
8078
PHONGO_ERROR_LOGIC = 9
8179
} php_phongo_error_domain_t;

php_phongo_classes.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ extern PHONGO_API zend_class_entry *php_phongo_sslconnectionexception_ce;
186186
extern PHONGO_API zend_class_entry *php_phongo_executiontimeoutexception_ce;
187187
extern PHONGO_API zend_class_entry *php_phongo_connectiontimeoutexception_ce;
188188
extern PHONGO_API zend_class_entry *php_phongo_writeexception_ce;
189-
extern PHONGO_API zend_class_entry *php_phongo_writeconcernexception_ce;
190-
extern PHONGO_API zend_class_entry *php_phongo_writeerrorexception_ce;
191189
extern PHONGO_API zend_class_entry *php_phongo_bulkwriteexception_ce;
192190

193191
extern PHONGO_API zend_class_entry *php_phongo_type_ce;
@@ -236,8 +234,6 @@ PHP_MINIT_FUNCTION(SSLConnectionException);
236234
PHP_MINIT_FUNCTION(ExecutionTimeoutException);
237235
PHP_MINIT_FUNCTION(ConnectionTimeoutException);
238236
PHP_MINIT_FUNCTION(WriteException);
239-
PHP_MINIT_FUNCTION(WriteConcernException);
240-
PHP_MINIT_FUNCTION(WriteErrorException);
241237
PHP_MINIT_FUNCTION(BulkWriteException);
242238

243239
PHP_MINIT_FUNCTION(Type);

src/MongoDB/Exception/WriteConcernException.c

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/MongoDB/Exception/WriteErrorException.c

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)