Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23260 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29642 invoked by uid 1010); 11 May 2006 18:36:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29627 invoked from network); 11 May 2006 18:36:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2006 18:36:00 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:42502] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 47/79-19568-F0483644 for ; Thu, 11 May 2006 14:35:59 -0400 Received: from baumbart.mbo (dslb-084-063-015-157.pools.arcor-ip.net [84.63.15.157]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 083D735C1DC; Thu, 11 May 2006 20:35:56 +0200 (CEST) Date: Thu, 11 May 2006 20:36:05 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <681073900.20060511203605@marcus-boerger.de> To: Derick Rethans Cc: PHP Developers Mailing List In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Stop Breaking Our Apps For the Sake of OO From: helly@php.net (Marcus Boerger) Hello Derick, Thursday, May 11, 2006, 2:15:53 PM, you wrote: > Hello! > While I welcome new developments in either procedural or OO interfaces > in PHP I do not agree with breaking BC (between 5.1 and 5.2 in this > case) just for the sake of OO purity. In this example there is the > following class: > abstract class ezcDbHandler extends PDO > { > public function __construct( $dbParams, $dsn ) > { > $user = null; > $pass = null; > $driverOptions = null; > } > abstract static public function getName(); > static public function hasFeature( $feature ) > { > return false; > } > } ?>> It simply makes no sense at all! Actually if we go that road then what you really want is two things: First fix your app design to something usable where your code makes sense Second allow static method interfaces with bodies as well as non static abstract function in classes that have bodies (aka default implementations). > which now with PHP 5.2 throws: > derick@kossu:/home/httpd/ezcomponents/trunk$ php-5.2dev -l /tmp/foo42.php > Fatal error: Static function ezcDbHandler::getName() cannot be > abstract in /tmp/foo42.php on line 11 > Errors parsing /tmp/foo42.php > And it works fine in PHP 5.1. It simply is a missing error condition and hadn't we just closed 5.1 i would add that missing check to 5.1 too. > Now I know that abstract static might not > make much sense OO wise, but it doesn't hurt a single bit to have it > here. Breaking this just because it isn't OO enough is just bogus. So, > when are we going to remove this check so that older apps work again? > regards, > Derick Best regards, Marcus