Modified: pear/packages/Log/trunk/Log.php =================================================================== --- pear/packages/Log/trunk/Log.php 2009-12-27 18:48:22 UTC (rev 292696) +++ pear/packages/Log/trunk/Log.php 2009-12-27 18:51:46 UTC (rev 292697) @@ -102,28 +102,6 @@ '%\{' => '%%{'); /** - * Utility function which wraps PHP's class_exists() function to ensure - * consistent behavior between PHP versions 4 and 5. Autoloading behavior - * is always disabled. - * - * @param string $class The name of the class whose existence should - * be tested. - * - * @return bool True if the class exists. - * - * @access private - * @since Log 1.9.13 - */ - function _classExists($class) - { - if (version_compare(PHP_VERSION, '5.0.0', 'ge')) { - return class_exists($class, false); - } - - return class_exists($class); - } - - /** * Attempts to return a concrete Log instance of type $handler. * * @param string $handler The type of concrete Log subclass to return. @@ -160,13 +138,13 @@ * a failure as fatal. The caller may have already included their own * version of the named class. */ - if (!Log::_classExists($class)) { + if (!class_exists($class, false)) { include_once $classfile; } /* If the class exists, return a new instance of it. */ - if (Log::_classExists($class)) { - $obj = &new $class($name, $ident, $conf, $level); + if (class_exists($class, false)) { + $obj = new $class($name, $ident, $conf, $level); return $obj; } @@ -429,11 +407,7 @@ } else if (method_exists($message, 'tostring')) { $message = $message->toString(); } else if (method_exists($message, '__tostring')) { - if (version_compare(PHP_VERSION, '5.0.0', 'ge')) { - $message = (string)$message; - } else { - $message = $message->__toString(); - } + $message = (string)$message; } else { $message = var_export($message, true); } Modified: pear/packages/Log/trunk/package.php =================================================================== --- pear/packages/Log/trunk/package.php 2009-12-27 18:48:22 UTC (rev 292696) +++ pear/packages/Log/trunk/package.php 2009-12-27 18:51:46 UTC (rev 292697) @@ -7,9 +7,13 @@ The Log package provides an abstracted logging framework. It includes output handlers for log files, databases, syslog, email, Firebug, and the console. It also provides composite and subject-observer logging mechanisms. EOT; -$version = '1.11.6'; +$version = '1.12.0a1'; $notes = <<setReleaseVersion($version); $package->setReleaseStability('stable'); $package->setNotes($notes); -$package->setPhpDep('4.3.0'); +$package->setPhpDep('5.0.0'); $package->setPearinstallerDep('1.4.3'); $package->addMaintainer('lead', 'jon', 'Jon Parise', 'jon@php.net'); $package->addMaintainer('lead', 'chagenbu', 'Chuck Hagenbuch', 'chuck@horde.org'); Modified: pear/packages/Log/trunk/package.xml =================================================================== --- pear/packages/Log/trunk/package.xml 2009-12-27 18:48:22 UTC (rev 292696) +++ pear/packages/Log/trunk/package.xml 2009-12-27 18:51:46 UTC (rev 292697) @@ -25,10 +25,10 @@ jan@horde.org yes - 2009-12-26 - + 2009-12-27 + - 1.11.6 + 1.12.0a1 1.0.0 @@ -37,7 +37,11 @@ MIT License -The syslog handler's maximum message length is now configurable via a new 'maxLength' configuration variable. If the handler receives a message longer than this length limit, it will be split into multiple syslog() calls. +This release drops PHP4 compatibility (enforced by the package dependencies). + +There is unfortunately no way to support both PHP4 and PHP5 in the same code base when running under E_ALL. Because it appears that the majority of Log package users have moved to PHP5, the Log package now targets that audience. + +Given the fact that the Log package is now largely in maintenance mode, existing PHP4 users shouldn't feel adandoned. If necessary, important fixes, etc. can be merged back into the 1.11.* release line, which will retain PHP4 compatibility. @@ -88,7 +92,6 @@ - @@ -111,7 +114,7 @@ - 4.3.0 + 5.0.0 1.4.3 @@ -141,6 +144,25 @@ + 1.12.0a1 + 1.0.0 + + + stable + stable + + 2009-12-27 + MIT License + +This release drops PHP4 compatibility (enforced by the package dependencies). + +There is unfortunately no way to support both PHP4 and PHP5 in the same code base when running under E_ALL. Because it appears that the majority of Log package users have moved to PHP5, the Log package now targets that audience. + +Given the fact that the Log package is now largely in maintenance mode, existing PHP4 users shouldn't feel adandoned. If necessary, important fixes, etc. can be merged back into the 1.11.* release line, which will retain PHP4 compatibility. + + + + 1.11.6 1.0.0 Deleted: pear/packages/Log/trunk/tests/extract-zend1.phpt =================================================================== --- pear/packages/Log/trunk/tests/extract-zend1.phpt 2009-12-27 18:48:22 UTC (rev 292696) +++ pear/packages/Log/trunk/tests/extract-zend1.phpt 2009-12-27 18:51:46 UTC (rev 292697) @@ -1,60 +0,0 @@ ---TEST-- -Log: _extractMessage() [Zend Engine 1.0] ---SKIPIF-- -=")) die('skip'); ?> ---FILE-- - '%2$s [%3$s] %4$s'); -$logger = &Log::singleton('console', '', 'ident', $conf); - -/* Logging a regular string. */ -$logger->log('String'); - -/* Logging a bare object. */ -class BareObject {} -$logger->log(new BareObject()); - -/* Logging an object with a getMessage() method. */ -class GetMessageObject { function getMessage() { return "getMessage"; } } -$logger->log(new GetMessageObject()); - -/* Logging an object with a toString() method. */ -class ToStringObject { function toString() { return "toString"; } } -$logger->log(new ToStringObject()); - -/* Logging a PEAR_Error object. */ -require_once 'PEAR.php'; -$logger->log(new PEAR_Error('PEAR_Error object', 100)); - -/* Logging an array. */ -$logger->log(array(1, 2, 'three' => 3)); - -/* Logging an array with scalar 'message' keys. */ -$logger->log(array('message' => 'Message Key')); -$logger->log(array('message' => 50)); - -/* Logging an array with a non-scalar 'message' key. */ -$logger->log(array('message' => array(1, 2, 3))); - ---EXPECT-- -ident [info] String -ident [info] class bareobject { -} -ident [info] getMessage -ident [info] toString -ident [info] PEAR_Error object -ident [info] array ( - 0 => 1, - 1 => 2, - 'three' => 3, -) -ident [info] Message Key -ident [info] 50 -ident [info] array ( - 0 => 1, - 1 => 2, - 2 => 3, -)