Skip to content

Commit 978c23c

Browse files
committed
Remove obsolete serialisation macro
1 parent ab4dd34 commit 978c23c

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.

0 commit comments

Comments
 (0)