Skip to content

Commit b0192b2

Browse files
committed
Reorder libbson and libmongoc output in phpinfo()
1 parent 2c4a1ed commit b0192b2

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

php_phongo.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,19 +1966,22 @@ PHP_MINFO_FUNCTION(mongodb)
19661966
php_info_print_table_header(2, "MongoDB support", "enabled");
19671967
php_info_print_table_row(2, "MongoDB extension version", MONGODB_VERSION_S);
19681968
php_info_print_table_row(2, "MongoDB extension stability", MONGODB_STABILITY_S);
1969+
1970+
#ifdef HAVE_SYSTEM_LIBBSON
1971+
php_info_print_table_row(2, "libbson headers version", BSON_VERSION_S);
1972+
php_info_print_table_row(2, "libbson library version", bson_get_version());
1973+
#else
1974+
php_info_print_table_row(2, "libbson bundled version", BSON_VERSION_S);
1975+
#endif
1976+
19691977
#ifdef HAVE_SYSTEM_LIBMONGOC
19701978
php_info_print_table_row(2, "libmongoc headers version", MONGOC_VERSION_S);
19711979
php_info_print_table_row(2, "libmongoc library version", mongoc_get_version());
19721980
#else
19731981
/* Bundled libraries, buildtime = runtime */
19741982
php_info_print_table_row(2, "libmongoc bundled version", MONGOC_VERSION_S);
19751983
#endif
1976-
#ifdef HAVE_SYSTEM_LIBBSON
1977-
php_info_print_table_row(2, "libbson headers version", BSON_VERSION_S);
1978-
php_info_print_table_row(2, "libbson library version", bson_get_version());
1979-
#else
1980-
php_info_print_table_row(2, "libbson bundled version", BSON_VERSION_S);
1981-
#endif
1984+
19821985
php_info_print_table_end();
19831986

19841987
DISPLAY_INI_ENTRIES();

tests/functional/phpinfo-1.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ mongodb
1919
MongoDB support => enabled
2020
MongoDB extension version => 1.%d.%d%S
2121
MongoDB extension stability => %s
22-
libmongoc bundled version => 1.%s
23-
libbson bundled version => 1.%s
22+
libbson bundled version => 1.%d.%d%S
23+
libmongoc bundled version => 1.%d.%d%S
2424

2525
Directive => Local Value => Master Value
2626
mongodb.debug => no value => no value

tests/functional/phpinfo-2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ mongodb
2222
MongoDB support => enabled
2323
MongoDB extension version => 1.%d.%d%S
2424
MongoDB extension stability => %s
25-
libmongoc bundled version => 1.%s
26-
libbson bundled version => 1.%s
25+
libbson bundled version => 1.%d.%d%S
26+
libmongoc bundled version => 1.%d.%d%S
2727

2828
Directive => Local Value => Master Value
2929
mongodb.debug => stdout => stderr

0 commit comments

Comments
 (0)