Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106824 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 24827 invoked from network); 31 Aug 2019 04:36:08 -0000 Received: from unknown (HELO mail-qk1-f178.google.com) (209.85.222.178) by pb1.pair.com with SMTP; 31 Aug 2019 04:36:08 -0000 Received: by mail-qk1-f178.google.com with SMTP id d26so293170qkk.2 for ; Fri, 30 Aug 2019 19:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dqxtech-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Pc1S6Ils9MDaxYuQDmgL/GhV2mjH8uJtgcY2Rw87Ks4=; b=ywdSdoXiDNpivIbCddEiH52jMThlljNvaZ/nf/o4u19Yml6Iijb5cYCALvF12Wg/F9 bs3ygzVnSrFcw5Tteuf/wVHUEzRpdoouFp3K1kzghmQcRi7ZKs6lbOdLoFb8FZfo88s0 Jk6dFMZMkuKZrqXBNQJAFRb38TSE5YWNq9P+i5U5pZer7AeI0yaRJloMtkJeOWF+crxU 0GIf5L2Cutjp3/7BIHDZUxTG12iutz/zhfZETjKpCCA02TrcuvBYrz/i5gPvKyxWyiY4 Oq+Aga2nag6J5YjeGbYH46Ria8CScT1pVQHZWDDZVgzIboyrprxySQ4w2RiJKbMWTsl7 VsAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Pc1S6Ils9MDaxYuQDmgL/GhV2mjH8uJtgcY2Rw87Ks4=; b=DAb/Lpp+wjVwKOjbD1kzK3YrGBeBKrfsdB0fCUHyKpVdrfNat6ZpL7jkHu5E7MUi/Q rSQghsWa+2QjE0eGEBOQN1/d/7lr5ao/me19Q49OdaTsw4ShFiAXU/jg9qrg0lqEqxFx YoQoQMDAyye+2BQTSrcWSPCe0fRl0+RazoT+aSIdAzBexUKQIPA1Vfl6X+rFSYU7Q1Cw 0GpdV6E2GHu46/8khr51j7ZlDDddqWsGzeH4Cy4kF4CQ8l1dY98Ib5peDSsLXNP+sINc g+E/YiNJhyGlUROxYpVsQAVNjSz0XzHM8+6ugVWsLKJ53ZreYmvhiHh44f064v4vVTU8 QtNw== X-Gm-Message-State: APjAAAUN6Q5MtJ4Gx6CIltl8dgoj9zoV3HU6oXYclwl5kJTN4OMVgFPF PyjG3HAHxATByCsd7l1X76zzRn7mnXg= X-Google-Smtp-Source: APXvYqwAIRp59Tsqny2Rp6cwn+80PU4LQJEKYrzVuOhlM2iqT+uZ72hjtDSlEwz/TLT3+ULS4gA4fw== X-Received: by 2002:a37:4051:: with SMTP id n78mr17829497qka.138.1567217334781; Fri, 30 Aug 2019 19:08:54 -0700 (PDT) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com. [209.85.222.181]) by smtp.googlemail.com with ESMTPSA id 20sm2644033qkn.4.2019.08.30.19.08.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Aug 2019 19:08:54 -0700 (PDT) Received: by mail-qk1-f181.google.com with SMTP id m2so7848855qki.12 for ; Fri, 30 Aug 2019 19:08:53 -0700 (PDT) X-Received: by 2002:a37:9c88:: with SMTP id f130mr18224557qke.494.1567217333574; Fri, 30 Aug 2019 19:08:53 -0700 (PDT) MIME-Version: 1.0 References: <595cafef-4c5d-d991-605d-d55bded017b4@thelounge.net> In-Reply-To: Date: Sat, 31 Aug 2019 04:08:42 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Reindl Harald Cc: Chase Peeler , PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Bringing Peace to the Galaxy From: andreas@dqxtech.net (Andreas Hennings) Some clarifications before I get crucified: > "editions" (the way I imagine) I don't want to misrepresent Nikita. His idea of editions might be completely different. > If "editions" (the way I imagine) had been introduced prior to PHP 7, we might now have a PHP 7 engine that would still support code written for PHP 5.x. Of course in general, most of the code "written for PHP 5.x" already works in PHP 7. Except when it doesn't. But the argument goes further. If "editions" had been around earlier, perhaps the opt-in flavor of PHP 7.n would already be more strict than it the non-opt-in flavor of PHP 7.n is now. Having the possibility to let files opt-in can allow for bolder and faster innovation, with less holding back. On Sat, 31 Aug 2019 at 03:52, Andreas Hennings wrote: > > On Sat, 31 Aug 2019 at 03:40, Reindl Harald wrote: > > > > > > > > Am 30.08.19 um 20:56 schrieb Andreas Hennings: > > > In one of -these modules I initially used the ?? null coalesce operator. > > > Then I had to replace all of the instances of ?? with the more verbose > > > old-school code, to make it compatible with older PHP, because there > > > are still enough Drupal 7 installations out there which have not > > > upgraded to PHP 7 yet. > > > I also had issues with old 3rd party libraries, which stood in the way > > > of PHP version upgrade. > > > > > > In a world with "editions" per file or per package, such projects > > > could more easily use the newest PHP version, while the old libraries > > > would continue working. > > > > no, it could not, when these days installations aren't running PHP7 at > > all you won#t have support for new features > > If "editions" (the way I imagine) had been introduced prior to PHP 7, > we might now have a PHP 7 engine that would still support code written > for PHP 5.x. > > There is a limit in how far this makes sense. In a lot of cases, what > "breaks" in PHP7 was already broken to begin with. > So in a way the BC breaks can be a good thing, they force people to > fix the mistakes from the past. > > > > > you can declare what you want on top of the file - when the server is > > sloppy mainatined and running stone old software you simply can't use a > > recent feature > > > > just stop supporting such unmaintained setups and they will disappear, > > break them as hard as you can! > > > you need to distinguish two different things here: > - server infrastructure / php version. > - the actual PHP code in the project, which might be a collection of > custom code and various 3rd party packages with different age. > > upgrading the server infrastructure and php version is easy, compared > to upgrading or fixing the PHP code itself. > The only reason why people might stick with an old infrastructure and > php version is because the new version might break their legacy PHP > code. > > As said earlier, I would claim that increased BC tolerance with opt-in > strictness per file would make it more likely that people use the > latest php version available.