Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32743 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38001 invoked by uid 1010); 13 Oct 2007 09:57:34 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37986 invoked from network); 13 Oct 2007 09:57:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Oct 2007 09:57:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=martin@divbyzero.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=martin@divbyzero.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain divbyzero.net from 80.237.234.119 cause and error) X-PHP-List-Original-Sender: martin@divbyzero.net X-Host-Fingerprint: 80.237.234.119 mx.bauer-kirch.de Linux 2.4/2.6 Received: from [80.237.234.119] ([80.237.234.119:56902] helo=mx.bauer-kirch.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/B0-30986-E8690174 for ; Sat, 13 Oct 2007 05:57:34 -0400 Received: by mx.bauer-kirch.de with ESMTP id 1IgdkR-0004dR-7F; Sat, 13 Oct 2007 11:57:31 +0200 Date: Sat, 13 Oct 2007 11:57:32 +0200 To: Stanislav Malyshev Cc: internals@lists.php.net Message-ID: <20071013095732.GA31153@trior.divbyzero.net> References: <20071012155453.GA18296@trior.divbyzero.net> <470FDE8D.1010402@zend.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <470FDE8D.1010402@zend.com> User-Agent: Mutt (Cray UniCOS) Subject: Re: [PHP-DEV] Unification of phpinfo() output for PDO drivers From: martin@divbyzero.net (Martin Jansen) --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri Oct 12, 2007 at 01:5229PM -0700, Stanislav Malyshev wrote: > Martin Jansen wrote: > >The attached patch against HEAD attempts to unify the phpinfo() output > >of the PDO drivers for Oracle, MySQL, and PostgreSQL by always including > >the PECL module version string and the $Id$ CVS keyword. (Akin to how > >it is done for the SQLite driver.) Assuming that you are interested in > >the changes, I can also provide them for the other PDO drivers. > > I think this would be a good idea to add these. Attached is an updated patch that covers all drivers in HEAD. - Martin --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pdo-phpinfo-unification.pach" Index: pdo_dblib/pdo_dblib.c =================================================================== RCS file: /repository/php-src/ext/pdo_dblib/pdo_dblib.c,v retrieving revision 1.17 diff -u -r1.17 pdo_dblib.c --- pdo_dblib/pdo_dblib.c 27 Sep 2007 18:28:40 -0000 1.17 +++ pdo_dblib/pdo_dblib.c 13 Oct 2007 09:55:10 -0000 @@ -32,6 +32,8 @@ #include "php_pdo_dblib_int.h" #include "zend_exceptions.h" +#define PHP_PDO_DBLIB_MODULE_VERSION "0.9" + ZEND_DECLARE_MODULE_GLOBALS(dblib) static PHP_GINIT_FUNCTION(dblib); @@ -66,7 +68,7 @@ NULL, PHP_RSHUTDOWN(pdo_dblib), PHP_MINFO(pdo_dblib), - "0.9", + PHP_PDO_DBLIB_MODULE_VERSION, PHP_MODULE_GLOBALS(dblib), PHP_GINIT(dblib), NULL, @@ -221,6 +223,7 @@ #endif " DB-lib", "enabled"); php_info_print_table_row(2, "Flavour", PDO_DBLIB_FLAVOUR); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_DBLIB_MODULE_VERSION " $Id$"); php_info_print_table_end(); } Index: pdo_firebird/pdo_firebird.c =================================================================== RCS file: /repository/php-src/ext/pdo_firebird/pdo_firebird.c,v retrieving revision 1.8 diff -u -r1.8 pdo_firebird.c --- pdo_firebird/pdo_firebird.c 27 Sep 2007 18:28:41 -0000 1.8 +++ pdo_firebird/pdo_firebird.c 13 Oct 2007 09:55:10 -0000 @@ -30,6 +30,8 @@ #include "php_pdo_firebird.h" #include "php_pdo_firebird_int.h" +#define PHP_PDO_FIREBIRD_MODULE_VERSION "0.2" + const zend_function_entry pdo_firebird_functions[] = { /* {{{ */ {NULL, NULL, NULL} }; @@ -44,7 +46,7 @@ NULL, NULL, PHP_MINFO(pdo_firebird), - "0.2", + PHP_PDO_FIREBIRD_MODULE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -73,6 +75,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "PDO Driver for Firebird/InterBase", "enabled"); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_FIREBIRD_MODULE_VERSION " $Id$"); php_info_print_table_end(); } /* }}} */ Index: pdo_mysql/pdo_mysql.c =================================================================== RCS file: /repository/php-src/ext/pdo_mysql/pdo_mysql.c,v retrieving revision 1.17 diff -u -r1.17 pdo_mysql.c --- pdo_mysql/pdo_mysql.c 27 Sep 2007 18:28:41 -0000 1.17 +++ pdo_mysql/pdo_mysql.c 13 Oct 2007 09:55:10 -0000 @@ -30,6 +30,8 @@ #include "php_pdo_mysql.h" #include "php_pdo_mysql_int.h" +#define PHP_PDO_MYSQL_MODULE_VERSION "0.9" + /* {{{ pdo_mysql_functions[] */ const zend_function_entry pdo_mysql_functions[] = { {NULL, NULL, NULL} @@ -60,7 +62,7 @@ NULL, NULL, PHP_MINFO(pdo_mysql), - "0.9", + PHP_PDO_MYSQL_MODULE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -102,6 +104,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "PDO Driver for MySQL 3.x Client Libraries", "enabled"); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_MYSQL_MODULE_VERSION " $Id$"); php_info_print_table_end(); } /* }}} */ Index: pdo_oci/pdo_oci.c =================================================================== RCS file: /repository/php-src/ext/pdo_oci/pdo_oci.c,v retrieving revision 1.10 diff -u -r1.10 pdo_oci.c --- pdo_oci/pdo_oci.c 27 Sep 2007 18:28:41 -0000 1.10 +++ pdo_oci/pdo_oci.c 13 Oct 2007 09:55:11 -0000 @@ -30,6 +30,8 @@ #include "php_pdo_oci.h" #include "php_pdo_oci_int.h" +#define PHP_PDO_OCI_MODULE_VERSION "0.9" + /* {{{ pdo_oci_functions[] */ const zend_function_entry pdo_oci_functions[] = { {NULL, NULL, NULL} @@ -59,7 +61,7 @@ NULL, NULL, PHP_MINFO(pdo_oci), - "0.9", + PHP_PDO_OCI_MODULE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -119,6 +121,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "PDO Driver for OCI 8 and later", "enabled"); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_OCI_MODULE_VERSION " $Id$"); php_info_print_table_end(); } /* }}} */ Index: pdo_odbc/pdo_odbc.c =================================================================== RCS file: /repository/php-src/ext/pdo_odbc/pdo_odbc.c,v retrieving revision 1.18 diff -u -r1.18 pdo_odbc.c --- pdo_odbc/pdo_odbc.c 27 Sep 2007 18:28:41 -0000 1.18 +++ pdo_odbc/pdo_odbc.c 13 Oct 2007 09:55:11 -0000 @@ -30,6 +30,8 @@ #include "php_pdo_odbc.h" #include "php_pdo_odbc_int.h" +#define PHP_PDO_ODBC_MODULE_VERSION "0.9" + /* {{{ pdo_odbc_functions[] */ const function_entry pdo_odbc_functions[] = { {NULL, NULL, NULL} @@ -60,7 +62,7 @@ NULL, NULL, PHP_MINFO(pdo_odbc), - "0.9", + PHP_PDO_ODBC_MODULE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -136,6 +138,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "PDO Driver for ODBC (" PDO_ODBC_TYPE ")" , "enabled"); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_ODBC_MODULE_VERSION " $Id$"); #ifdef SQL_ATTR_CONNECTION_POOLING php_info_print_table_row(2, "ODBC Connection Pooling", pdo_odbc_pool_on == SQL_CP_OFF ? "Disabled" : (pdo_odbc_pool_mode == SQL_CP_STRICT_MATCH ? "Enabled, strict matching" : "Enabled, relaxed matching")); Index: pdo_pgsql/pdo_pgsql.c =================================================================== RCS file: /repository/php-src/ext/pdo_pgsql/pdo_pgsql.c,v retrieving revision 1.16 diff -u -r1.16 pdo_pgsql.c --- pdo_pgsql/pdo_pgsql.c 27 Sep 2007 18:28:41 -0000 1.16 +++ pdo_pgsql/pdo_pgsql.c 13 Oct 2007 09:55:11 -0000 @@ -30,6 +30,8 @@ #include "php_pdo_pgsql.h" #include "php_pdo_pgsql_int.h" +#define PHP_PDO_PGSQL_MODULE_VERSION "0.9" + #ifdef HAVE_PG_CONFIG_H #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME @@ -70,7 +72,7 @@ PHP_RINIT(pdo_pgsql), PHP_RSHUTDOWN(pdo_pgsql), PHP_MINFO(pdo_pgsql), - "0.9", + PHP_PDO_PGSQL_MODULE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -127,8 +129,7 @@ #ifdef HAVE_PG_CONFIG_H php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION); #endif - php_info_print_table_row(2, "Module version", pdo_pgsql_module_entry.version); - php_info_print_table_row(2, "Revision", " $Id: pdo_pgsql.c,v 1.16 2007/09/27 18:28:41 dmitry Exp $ "); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_PGSQL_MODULE_VERSION " $Id$"); php_info_print_table_end(); } --azLHFNyN32YCQGCU--