Skip to content

Commit f33816c

Browse files
committed
Remove obsolete serialisation macro
1 parent da19464 commit f33816c

File tree

79 files changed

+78
-91
lines changed

Some content is hidden

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

79 files changed

+78
-91
lines changed

php_phongo.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,6 @@ zend_object_handlers* phongo_get_std_object_handlers(void);
6565
ce->ce_flags |= ZEND_ACC_FINAL; \
6666
} while (0)
6767

68-
#if PHP_VERSION_ID < 80100
69-
#define PHONGO_CE_DISABLE_SERIALIZATION(ce) \
70-
do { \
71-
ce->serialize = zend_class_serialize_deny; \
72-
ce->unserialize = zend_class_unserialize_deny; \
73-
} while (0)
74-
#else
75-
#define PHONGO_CE_DISABLE_SERIALIZATION(ce) \
76-
do { \
77-
ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; \
78-
} while (0)
79-
#endif
80-
8168
#define PHONGO_GET_PROPERTY_HASH_INIT_PROPS(is_temp, intern, props, size) \
8269
do { \
8370
if (is_temp) { \

src/BSON/Iterator.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ void php_phongo_iterator_init_ce(INIT_FUNC_ARGS)
383383
php_phongo_iterator_ce = register_class_MongoDB_BSON_Iterator(zend_ce_iterator);
384384
php_phongo_iterator_ce->create_object = php_phongo_iterator_create_object;
385385
php_phongo_iterator_ce->get_iterator = php_phongo_iterator_get_iterator;
386-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_iterator_ce);
387386

388387
memcpy(&php_phongo_handler_iterator, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
389388
php_phongo_handler_iterator.clone_obj = php_phongo_iterator_clone_object;

src/BSON/Iterator.stub.php

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

88
namespace MongoDB\BSON;
99

10+
/** @not-serializable */
1011
final class Iterator implements \Iterator
1112
{
1213
final private function __construct() {}

src/BSON/Iterator_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/BulkWrite.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@ void php_phongo_bulkwrite_init_ce(INIT_FUNC_ARGS)
667667
{
668668
php_phongo_bulkwrite_ce = register_class_MongoDB_Driver_BulkWrite(zend_ce_countable);
669669
php_phongo_bulkwrite_ce->create_object = php_phongo_bulkwrite_create_object;
670-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_bulkwrite_ce);
671670

672671
memcpy(&php_phongo_handler_bulkwrite, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
673672
php_phongo_handler_bulkwrite.get_debug_info = php_phongo_bulkwrite_get_debug_info;

src/MongoDB/BulkWrite.stub.php

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

88
namespace MongoDB\Driver;
99

10+
/** @not-serializable */
1011
final class BulkWrite implements \Countable
1112
{
1213
final public function __construct(?array $options = null) {}

src/MongoDB/BulkWrite_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/ClientEncryption.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,6 @@ void php_phongo_clientencryption_init_ce(INIT_FUNC_ARGS)
526526
{
527527
php_phongo_clientencryption_ce = register_class_MongoDB_Driver_ClientEncryption();
528528
php_phongo_clientencryption_ce->create_object = php_phongo_clientencryption_create_object;
529-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_clientencryption_ce);
530529

531530
memcpy(&php_phongo_handler_clientencryption, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
532531
php_phongo_handler_clientencryption.get_debug_info = php_phongo_clientencryption_get_debug_info;

src/MongoDB/ClientEncryption.stub.php

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

88
namespace MongoDB\Driver;
99

10+
/** @not-serializable */
1011
final class ClientEncryption
1112
{
1213
/**

src/MongoDB/ClientEncryption_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Command.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ void php_phongo_command_init_ce(INIT_FUNC_ARGS)
172172
{
173173
php_phongo_command_ce = register_class_MongoDB_Driver_Command();
174174
php_phongo_command_ce->create_object = php_phongo_command_create_object;
175-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_command_ce);
176175

177176
memcpy(&php_phongo_handler_command, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
178177
php_phongo_handler_command.get_debug_info = php_phongo_command_get_debug_info;

src/MongoDB/Command.stub.php

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

88
namespace MongoDB\Driver;
99

10+
/** @not-serializable */
1011
final class Command
1112
{
1213
final public function __construct(array|object $document, ?array $commandOptions = null) {}

src/MongoDB/Command_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Cursor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ void php_phongo_cursor_init_ce(INIT_FUNC_ARGS)
430430
{
431431
php_phongo_cursor_ce = register_class_MongoDB_Driver_Cursor(zend_ce_iterator, php_phongo_cursor_interface_ce);
432432
php_phongo_cursor_ce->create_object = php_phongo_cursor_create_object;
433-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_cursor_ce);
434433

435434
memcpy(&php_phongo_handler_cursor, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
436435
php_phongo_handler_cursor.get_debug_info = php_phongo_cursor_get_debug_info;

src/MongoDB/Cursor.stub.php

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

88
namespace MongoDB\Driver;
99

10+
/** @not-serializable */
1011
final class Cursor implements \Iterator, CursorInterface
1112
{
1213
final private function __construct() {}

src/MongoDB/Cursor_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Manager.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,6 @@ void php_phongo_manager_init_ce(INIT_FUNC_ARGS)
901901
{
902902
php_phongo_manager_ce = register_class_MongoDB_Driver_Manager();
903903
php_phongo_manager_ce->create_object = php_phongo_manager_create_object;
904-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_manager_ce);
905904

906905
memcpy(&php_phongo_handler_manager, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
907906
php_phongo_handler_manager.get_debug_info = php_phongo_manager_get_debug_info;

src/MongoDB/Manager.stub.php

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

88
namespace MongoDB\Driver;
99

10+
/** @not-serializable */
1011
final class Manager
1112
{
1213
final public function __construct(?string $uri = null, ?array $uriOptions = null, ?array $driverOptions = null) {}

src/MongoDB/Manager_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Monitoring/CommandFailedEvent.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ void php_phongo_commandfailedevent_init_ce(INIT_FUNC_ARGS)
289289
{
290290
php_phongo_commandfailedevent_ce = register_class_MongoDB_Driver_Monitoring_CommandFailedEvent();
291291
php_phongo_commandfailedevent_ce->create_object = php_phongo_commandfailedevent_create_object;
292-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_commandfailedevent_ce);
293292

294293
memcpy(&php_phongo_handler_commandfailedevent, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
295294
php_phongo_handler_commandfailedevent.get_debug_info = php_phongo_commandfailedevent_get_debug_info;

src/MongoDB/Monitoring/CommandFailedEvent.stub.php

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

88
namespace MongoDB\Driver\Monitoring;
99

10+
/** @not-serializable */
1011
final class CommandFailedEvent
1112
{
1213
final private function __construct() {}

src/MongoDB/Monitoring/CommandFailedEvent_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Monitoring/CommandStartedEvent.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ void php_phongo_commandstartedevent_init_ce(INIT_FUNC_ARGS)
258258
{
259259
php_phongo_commandstartedevent_ce = register_class_MongoDB_Driver_Monitoring_CommandStartedEvent();
260260
php_phongo_commandstartedevent_ce->create_object = php_phongo_commandstartedevent_create_object;
261-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_commandstartedevent_ce);
262261

263262
memcpy(&php_phongo_handler_commandstartedevent, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
264263
php_phongo_handler_commandstartedevent.get_debug_info = php_phongo_commandstartedevent_get_debug_info;

src/MongoDB/Monitoring/CommandStartedEvent.stub.php

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

88
namespace MongoDB\Driver\Monitoring;
99

10+
/** @not-serializable */
1011
final class CommandStartedEvent
1112
{
1213
final private function __construct() {}

src/MongoDB/Monitoring/CommandStartedEvent_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Monitoring/CommandSucceededEvent.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ void php_phongo_commandsucceededevent_init_ce(INIT_FUNC_ARGS)
270270
{
271271
php_phongo_commandsucceededevent_ce = register_class_MongoDB_Driver_Monitoring_CommandSucceededEvent();
272272
php_phongo_commandsucceededevent_ce->create_object = php_phongo_commandsucceededevent_create_object;
273-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_commandsucceededevent_ce);
274273

275274
memcpy(&php_phongo_handler_commandsucceededevent, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
276275
php_phongo_handler_commandsucceededevent.get_debug_info = php_phongo_commandsucceededevent_get_debug_info;

src/MongoDB/Monitoring/CommandSucceededEvent.stub.php

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

88
namespace MongoDB\Driver\Monitoring;
99

10+
/** @not-serializable */
1011
final class CommandSucceededEvent
1112
{
1213
final private function __construct() {}

src/MongoDB/Monitoring/CommandSucceededEvent_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Monitoring/ServerChangedEvent.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ void php_phongo_serverchangedevent_init_ce(INIT_FUNC_ARGS)
154154
{
155155
php_phongo_serverchangedevent_ce = register_class_MongoDB_Driver_Monitoring_ServerChangedEvent();
156156
php_phongo_serverchangedevent_ce->create_object = php_phongo_serverchangedevent_create_object;
157-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_serverchangedevent_ce);
158157

159158
memcpy(&php_phongo_handler_serverchangedevent, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
160159
php_phongo_handler_serverchangedevent.get_debug_info = php_phongo_serverchangedevent_get_debug_info;

src/MongoDB/Monitoring/ServerChangedEvent.stub.php

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

88
namespace MongoDB\Driver\Monitoring;
99

10+
/** @not-serializable */
1011
final class ServerChangedEvent
1112
{
1213
final private function __construct() {}

src/MongoDB/Monitoring/ServerChangedEvent_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Monitoring/ServerClosedEvent.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ void php_phongo_serverclosedevent_init_ce(INIT_FUNC_ARGS)
110110
{
111111
php_phongo_serverclosedevent_ce = register_class_MongoDB_Driver_Monitoring_ServerClosedEvent();
112112
php_phongo_serverclosedevent_ce->create_object = php_phongo_serverclosedevent_create_object;
113-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_serverclosedevent_ce);
114113

115114
memcpy(&php_phongo_handler_serverclosedevent, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
116115
php_phongo_handler_serverclosedevent.get_debug_info = php_phongo_serverclosedevent_get_debug_info;

src/MongoDB/Monitoring/ServerClosedEvent.stub.php

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

88
namespace MongoDB\Driver\Monitoring;
99

10+
/** @not-serializable */
1011
final class ServerClosedEvent
1112
{
1213
final private function __construct() {}

src/MongoDB/Monitoring/ServerClosedEvent_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MongoDB/Monitoring/ServerHeartbeatFailedEvent.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ void php_phongo_serverheartbeatfailedevent_init_ce(INIT_FUNC_ARGS)
125125
{
126126
php_phongo_serverheartbeatfailedevent_ce = register_class_MongoDB_Driver_Monitoring_ServerHeartbeatFailedEvent();
127127
php_phongo_serverheartbeatfailedevent_ce->create_object = php_phongo_serverheartbeatfailedevent_create_object;
128-
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_serverheartbeatfailedevent_ce);
129128

130129
memcpy(&php_phongo_handler_serverheartbeatfailedevent, phongo_get_std_object_handlers(), sizeof(zend_object_handlers));
131130
php_phongo_handler_serverheartbeatfailedevent.get_debug_info = php_phongo_serverheartbeatfailedevent_get_debug_info;

src/MongoDB/Monitoring/ServerHeartbeatFailedEvent.stub.php

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

88
namespace MongoDB\Driver\Monitoring;
99

10+
/** @not-serializable */
1011
final class ServerHeartbeatFailedEvent
1112
{
1213
final private function __construct() {}

0 commit comments

Comments
 (0)