Skip to content

Commit aeb2bc4

Browse files
remicolletjmikola
authored andcommitted
PHPC-442: report PHP version in debug info
1 parent efde19a commit aeb2bc4

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

php_phongo.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,7 @@ mongoc_client_t *php_phongo_make_mongo_client(const mongoc_uri_t *uri, zval *dri
18831883
php_phongo_populate_default_ssl_ctx(ctx, driverOptions);
18841884
}
18851885

1886-
MONGOC_DEBUG("Creating Manager, phongo-%s[%s] - mongoc-%s(%s), libbson-%s(%s)",
1886+
MONGOC_DEBUG("Creating Manager, phongo-%s[%s] - mongoc-%s(%s), libbson-%s(%s), php-%s",
18871887
MONGODB_VERSION_S,
18881888
MONGODB_STABILITY_S,
18891889
MONGOC_VERSION_S,
@@ -1894,10 +1894,11 @@ mongoc_client_t *php_phongo_make_mongo_client(const mongoc_uri_t *uri, zval *dri
18941894
#endif
18951895
BSON_VERSION_S,
18961896
#ifdef HAVE_SYSTEM_LIBBSON
1897-
bson_get_version()
1897+
bson_get_version(),
18981898
#else
1899-
"bundled"
1899+
"bundled",
19001900
#endif
1901+
PHP_VERSION
19011902
);
19021903
client = mongoc_client_new_from_uri(uri);
19031904

tests/manager/manager-debug-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ foreach($content as $line) {
3030
===DONE===
3131
<?php exit(0); ?>
3232
--EXPECTF--
33-
[%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s)
33+
[%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s), php-%s
3434
[%s] mongoc: TRACE > ENTRY: mongoc_bulk_operation_execute():%d
3535
[%s] mongoc: TRACE > EXIT: mongoc_bulk_operation_execute():%d
3636
===DONE===

tests/manager/manager-debug-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ini_set("mongodb.debug", "off");
2020
<?php exit(0); ?>
2121
--EXPECTF--
2222
%a
23-
[%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s)
23+
[%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s), php-%s
2424
%a
2525
[%s] PHONGO: DEBUG > Connecting to '%s:%d[mongodb://%s:%d]'
2626
%a

tests/manager/manager-debug-003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ ini_set("mongodb.debug", "off");
2121
--EXPECTF--
2222
%a
2323
[%s] PHONGO: TRACE > ENTRY: php_phongo_make_mongo_client():%d
24-
[%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s)
24+
[%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s), php-%s
2525
%a
2626
===DONE===

0 commit comments

Comments
 (0)