Conditional package dependencies?

From: Date: Fri, 08 Jun 2007 18:19:47 +0000
Subject: Conditional package dependencies?
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-46980@lists.php.net to get a copy of this message
Hi, we like to publish a new DataSource driver for Structures_DataGrid soon. This new driver will combine the current DBQuery and MDB2 drivers (which will be marked as deprecated then), and add additional support for PDO. Because of the usage of a try/catch block around the PDO constructor, we need to require PHP 5 for the new driver, while Structures_DataGrid itself remains PHP 4 compatible. The problem now is that we want to make the new SQLQuery driver the default driver for PHP 5 users if a SQL query is passed to the bind() method. This modified auto-detection would require that our users have the new SQLQuery driver installed; otherwise backwards compatibility would be broken. To keep it short: Is there a way to define a conditional dependency that requires the new driver if PHP 5 is used, and that defines only an optional dependency if PHP 4 is used? Other suggestions on this problem are also welcome, of course. Regards, Mark -- http://www.markwiesemann.eu

« previous php.pear.dev (#46980) next »