From a04aa7790400921353c8cb29056fb5b2c74329e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Thu, 26 Sep 2024 07:34:33 +0200 Subject: [PATCH] PHPC-2344 Remove SSLConnectionException --- config.m4 | 1 - config.w32 | 2 +- php_phongo.c | 1 - .../Exception/SSLConnectionException.c | 27 ------------------- .../Exception/SSLConnectionException.stub.php | 13 --------- .../SSLConnectionException_arginfo.h | 20 -------------- src/phongo_classes.h | 1 - 7 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 src/MongoDB/Exception/SSLConnectionException.c delete mode 100644 src/MongoDB/Exception/SSLConnectionException.stub.php delete mode 100644 src/MongoDB/Exception/SSLConnectionException_arginfo.h diff --git a/config.m4 b/config.m4 index b886ab597..5672ba6b6 100644 --- a/config.m4 +++ b/config.m4 @@ -195,7 +195,6 @@ if test "$PHP_MONGODB" != "no"; then src/MongoDB/Exception/LogicException.c \ src/MongoDB/Exception/RuntimeException.c \ src/MongoDB/Exception/ServerException.c \ - src/MongoDB/Exception/SSLConnectionException.c \ src/MongoDB/Exception/UnexpectedValueException.c \ src/MongoDB/Monitoring/CommandFailedEvent.c \ src/MongoDB/Monitoring/CommandStartedEvent.c \ diff --git a/config.w32 b/config.w32 index 620d7fad2..ee8844a2e 100644 --- a/config.w32 +++ b/config.w32 @@ -117,7 +117,7 @@ if (PHP_MONGODB != "no") { 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"); 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"); 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"); - 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"); + 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"); 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"); MONGODB_ADD_SOURCES("/src/libmongoc/src/common", PHP_MONGODB_COMMON_SOURCES); MONGODB_ADD_SOURCES("/src/libmongoc/src/libbson/src/bson", PHP_MONGODB_BSON_SOURCES); diff --git a/php_phongo.c b/php_phongo.c index fb7b6d55a..6b3f0f6e5 100644 --- a/php_phongo.c +++ b/php_phongo.c @@ -282,7 +282,6 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */ php_phongo_executiontimeoutexception_init_ce(INIT_FUNC_ARGS_PASSTHRU); php_phongo_invalidargumentexception_init_ce(INIT_FUNC_ARGS_PASSTHRU); php_phongo_logicexception_init_ce(INIT_FUNC_ARGS_PASSTHRU); - php_phongo_sslconnectionexception_init_ce(INIT_FUNC_ARGS_PASSTHRU); php_phongo_unexpectedvalueexception_init_ce(INIT_FUNC_ARGS_PASSTHRU); /* Register base APM classes first */ diff --git a/src/MongoDB/Exception/SSLConnectionException.c b/src/MongoDB/Exception/SSLConnectionException.c deleted file mode 100644 index 13a177510..000000000 --- a/src/MongoDB/Exception/SSLConnectionException.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2014-present MongoDB, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -#include "php_phongo.h" -#include "SSLConnectionException_arginfo.h" - -zend_class_entry* php_phongo_sslconnectionexception_ce; - -void php_phongo_sslconnectionexception_init_ce(INIT_FUNC_ARGS) -{ - php_phongo_sslconnectionexception_ce = register_class_MongoDB_Driver_Exception_SSLConnectionException(php_phongo_connectionexception_ce); -} diff --git a/src/MongoDB/Exception/SSLConnectionException.stub.php b/src/MongoDB/Exception/SSLConnectionException.stub.php deleted file mode 100644 index 0c6ae5446..000000000 --- a/src/MongoDB/Exception/SSLConnectionException.stub.php +++ /dev/null @@ -1,13 +0,0 @@ -ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_DEPRECATED; - - return class_entry; -} diff --git a/src/phongo_classes.h b/src/phongo_classes.h index af8c42e5b..b0b9f01a4 100644 --- a/src/phongo_classes.h +++ b/src/phongo_classes.h @@ -324,7 +324,6 @@ extern zend_class_entry* php_phongo_unexpectedvalueexception_ce; extern zend_class_entry* php_phongo_invalidargumentexception_ce; extern zend_class_entry* php_phongo_connectionexception_ce; extern zend_class_entry* php_phongo_authenticationexception_ce; -extern zend_class_entry* php_phongo_sslconnectionexception_ce; extern zend_class_entry* php_phongo_encryptionexception_ce; extern zend_class_entry* php_phongo_executiontimeoutexception_ce; extern zend_class_entry* php_phongo_connectiontimeoutexception_ce;