Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65682 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78294 invoked from network); 5 Feb 2013 21:54:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2013 21:54:21 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.212.53 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.212.53 mail-vb0-f53.google.com Received: from [209.85.212.53] ([209.85.212.53:60291] helo=mail-vb0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/10-11820-C8F71115 for ; Tue, 05 Feb 2013 16:54:21 -0500 Received: by mail-vb0-f53.google.com with SMTP id fj18so395393vbb.40 for ; Tue, 05 Feb 2013 13:54:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=HVsK1nAaoIrIIMo8WhKYBlH3o7N6iZPvOrBDnphlvUA=; b=YCbkGViihmn6RiqTy11B8xWKEeO4T1vKtHPeM7pLIw4MQfAlGDLEZPMjCAvfmbHJor jQlkgAa+a7Tr1xX+mkAkaIltOdcwkYvkKaE9DAnkgf3P/1eSzj2unVDi2ZPd4h2rouOh vkL+u+V/nmII4P5IxM/4zcUxSSrnupNqrzmlFCBfgXky5ocrbSSWcJH2UADTg8A3z/DZ 6StBddElsmDt6CEfqVMA86RJLhFIlMjSIRn+TTIX5l3qx4Py4xSyFp2tVEF+Ag6r9bEq 6toi1PYk7EHoiDS/pcVN5SSpgqUzyVzqAq6ImjtIlSwEVPy9KAQ2820SMIPz/CikvqG7 uDRw== X-Received: by 10.58.234.234 with SMTP id uh10mr26092512vec.37.1360101257354; Tue, 05 Feb 2013 13:54:17 -0800 (PST) Received: from [192.168.200.148] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id sk8sm29430416vdb.13.2013.02.05.13.54.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Feb 2013 13:54:16 -0800 (PST) Message-ID: <51117F86.3050001@lerdorf.com> Date: Tue, 05 Feb 2013 13:54:14 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Karoly Negyesi CC: "internals@lists.php.net" References: <510EBF98.4060900@lerdorf.com> <5110AFFB.8040303@lerdorf.com> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQm5xw5Tg33RObqdG2Bco380tp3AZ8+pDFJbpPw/II+XgZ+GTDVFrECPrXuc23cvMu71i3XY Subject: Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning From: rasmus@lerdorf.com (Rasmus Lerdorf) On 02/05/2013 12:16 PM, Karoly Negyesi wrote: >> Yup, so please test it against 5.5 now. Have you done so? It is rather >> trivial to do. Grab it from git or there is a tarball at http://qa.php.net > >>> Let me describe my world. I am working on an open source package. So >>> does another 1000 or so developers. And another 10 000 adds modules >>> (or maybe you'd call them plugins). I do not even know how many then >>> adds custom, site specific code. This whole pile of software forms an > > Care to explain how am I supposed to test all that against 5.5? > Obviously you'd need every project owner doing this but they won't > because their hosts are not even on 5.4 so why would they even think > of 5.5? (5.4? A lot of people are on 5.2.) > >> Yes, I would say it is unattainable. You are essentially asking that we >> don't make any changes. > > Where did I say that? > >> Nothing that could possibly affect existing code >> down to and including any potential warning messages even if that code >> is obviously incorrect, insecure and/or not doing what the developer >> intended. That means no new keywords, no new notices, no bug fixes. What >> exactly can we do in a new version then? > > new keywords is an interesting discussion to have -- it's actually the > first real thing to discuss as far as I can see. For example that is > something that version strings would tremendously help. You do not > need to maintain the whole lot of behaviors for every version just the > parser? Also, new keywords typically introduce new syntax. Here's an > example, a quick github code search found > https://github.com/chriso/klein.php/blob/master/klein.php#L600 this. > function yield() is not a valid usage of the new yield keyword nor is > yield() so perhaps it's not impossible to accomodate this kind of > code? Let's discuss. Let's not. We are not going to add version tags. There is nothing to discuss here. > New error messages could be INI controlled to avoid surprises. And no, more ini switches to control the nature of notices won't happen either, sorry. > Why no bugfixes? Absolutely yes to bugfixes -- once again if a piece > was not running before then that running in a new version is breaking > *forward* not backwards compatbility. If a bugfix changes behavior, > then again, that needs discussion, do you have any good examples? I am > not familiar enough with the bugs to say "here's a bugfix which made > foo(NULL) return NULL instead of FALSE" or somesuch. Very few bug fixes are simple in the sense that they make something work that didn't work at all before. Usually they fix behaviour, generally in edge-case scenarios, but not always. Two examples from PHP 5.4: We discovered that the output of our Tiger hash was wrong. This has been corrected in 5.4. If you have stored pre-5.4 Tiger hashes you are going to need to fix these. See the comments of http://php.net/61307 for the code to generate the old hashes for upgrade purposes. The output from pack() was non-standard as well. We have brought that in line with pack() from Perl and other languages. This can potentially break code as we saw with it breaking Pear's Tar implementation. Does this mean we shouldn't fix stuff like this? I don't think it does. The way to handle it from user apps is to test your app against new versions as early as possible and to make it clear that Drupal version 7.X is fully compatible with PHP version 5.4. It may work with later versions, of course, but as a project you should test and state which versions it is guaranteed to work with. Once you have done sufficient testing with 5.5 you can certify a specific version of Drupal as being compatible with 5.5. I don't think it needs to be any more complicated than that. -Rasmus