Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107215 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 29578 invoked from network); 18 Sep 2019 20:00:30 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 18 Sep 2019 20:00:30 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 8FE382C8725 for ; Wed, 18 Sep 2019 10:37:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-vk1-xa29.google.com (mail-vk1-xa29.google.com [IPv6:2607:f8b0:4864:20::a29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Wed, 18 Sep 2019 10:37:57 -0700 (PDT) Received: by mail-vk1-xa29.google.com with SMTP id t136so198305vkt.9 for ; Wed, 18 Sep 2019 10:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=heMBcssa9xswVtRFvlDs+3QqLtWjoUX/EdyKw6Q4O3M=; b=IFq1dCyVg13CCO/2/tbyCX/Jl+pnX90Ojzd2OzTBAmf4Hp/hL2DTylILTAjVVy9Jcs tjBKdmuxCSM3lJI+9SdNo/z+BpJ/htEYNxvBvOCuezl4UsvtrO2APopWm6wyrE3eX25w NmmBaP21/sex2ozmQVJvlYkF2iPzcuxXUSAV5HeVYnHKmigrxZABN15tUrRZDYNEhsxE AY0NVDRD1VgTIfKEVG+tEu2qyBY21N5DhnNMOwO9jQ6xrGtYw+bWiGCVpOofD8Nlhv7O JsrFqK8s4ruUlzIQZIiFB25mTjjCpRujPn3+4Y1OurX9poFItuVIoqOcKuG6IWkMidY8 C04A== 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=heMBcssa9xswVtRFvlDs+3QqLtWjoUX/EdyKw6Q4O3M=; b=TYfytQwqZrS04UStF7c3YvbdydVbtpdWqbnaFl+emO0rNszOcgOTwacl7a5kYwKcg0 B4N3irPSPG9CzOWRHqKGxBtdOT0nzUr/GXPWNq78jGNx3S0/+RN5G/Ji/nX35HgbOMi2 uybK1urHDQpkYr7B+9pO8iiLfbxWpybXUsOGghQ9QcCNB4KNxcc1EKUybxXUBl9e8Elj rKk4ZfZJxeidB2cbJV4kR5C+ipmN/1N7j3ROqiDoRFTYOd2OFIglIX+WtCR4J0IBrzaB l/HaOWbSBcTxpZux0F/OtuNQqs7gucPP9dgtvCc/oogMifm4zf7rEiUG9fTcW/6TUq/n ky2g== X-Gm-Message-State: APjAAAWj9njxjocrjbFtNBvcRoM7KkaW3ohfsMdslt/NrViojNA1FxuJ Q5uJ23kj+OWqHxQyvXlwpoOjsVL7x8FmOTBqpLQ= X-Google-Smtp-Source: APXvYqwpc6h+vQEUtQRS4X40Gw5ecv6qZBoOf6SRWeacOWraM5A8mGSWAL6q3izir2rghku5EpPuHijp4NWf0LNqx5A= X-Received: by 2002:a1f:5243:: with SMTP id g64mr2651119vkb.26.1568828276397; Wed, 18 Sep 2019 10:37:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 18 Sep 2019 13:37:45 -0400 Message-ID: To: Nikita Popov Cc: "guilhermeblanco@gmail.com" , PHP internals Content-Type: multipart/alternative; boundary="00000000000020dc340592d74c4a" X-Envelope-From: Subject: Re: [PHP-DEV] Re: [VOTE] Reclassifying engine warnings From: chasepeeler@gmail.com (Chase Peeler) --00000000000020dc340592d74c4a Content-Type: text/plain; charset="UTF-8" On Wed, Sep 18, 2019 at 12:51 PM Nikita Popov wrote: > On Wed, Sep 18, 2019 at 6:32 PM guilhermeblanco@gmail.com < > guilhermeblanco@gmail.com> wrote: > > > Nikita, > > > > I'd suggest to wait until the current vote ends and then open a new > > RFC to vote this one, otherwise it'll be disrupting. > > > > Err, to be clear, I'm not suggesting to change the RFC under vote. We have > enough drama without that ;) > > I certainly don't care about this enough to run it through a separate RFC > vote either. I'd like a simple consensus decision on a minor point. If > Chase & co tell me that "This is no problem for us, go ahead" or "This is > going to break all our code, leave it alone" that's good enough for me. > > I don't know if I should be flattered or concerned that I was called out by name :-) I also want to reiterate, for the record, most of my arguments in regards to breaking BC isn't "This will be hard for me" as much as it its "This will be hard for a lot of other users" - I would never ask for anything to be done based on a use-case that only applies to me. That being said, I don't really know what the impact to the rest of userland would be. Since you can't actually redefine constants, I would argue that defining a previously defined constant *IS* probably an error situation. We actually have a "local_constants.php" that's included at the top of "constants.php" file. We can then define things in the local_constants.php, "overriding" the value in the constants.php file. All of the defines in the constants.php are preceded with @ though. Not sure if @ will suppress exceptions, but if not, that can always be put in try/catch (it'll just be REALLY ugly :-)). Also, we're trying to migrate away from the constants to using YAML configuration files, which handle per-environment overriding much better, but I digress. I think that's a specific exception though, where we know that we might be trying to define an already defined constant, and don't want it redefined. In most cases, if you are defining a constant, it's because you want it defined to that value, and are not aware it already was defined. I find that a totally different situation than using $i++ without having done $i=0 first. > Context is that the current notice prevents constant propagation > optimizations. A warning won't help us either, but it would be the first > step towards making it an exception in the future, which *would* enable > those optimizations. > > So, this is a case where there is an advantage to the change beyond "We want things to be more strict" - As many of us have said, we aren't against BC breaks. We just feel they should provide something that makes the language functionally better at a level that justifies the break. > Regards, > Nikita > > > > > > On Wed, Sep 18, 2019 at 12:29 PM Nikita Popov > > wrote: > > > > > > On Thu, Sep 12, 2019 at 2:17 PM Nikita Popov > > wrote: > > > > > > > Hi internals, > > > > > > > > I've opened the vote on //wiki.php.net/rfc/engine_warnings. > > > > > > > > There are 4 votes, all of them independent. The first 3 are for > > specific > > > > cases that were controversial during the discussion, the last one is > > for > > > > the remainder of the proposal. > > > > > > > > Voting closes 2019-09-26. > > > > > > > > Regards, > > > > Nikita > > > > > > > > > > I just realized that I missed one notice here, because it is generated > > from > > > a different location: "Constant %s already defined" (The define/const > > will > > > be ignored and the previous value used.) > > > > > > It would be great to have that as an exception for optimization > reasons, > > > but as it's only a notice right now ... what do people think about > > > promoting it to a warning? > > > > > > Nikita > > > > > > > > -- > > Guilherme Blanco > > SVP Technology at Statflo Inc. > > Mobile: +1 647 232 5599 > > > -- Chase Peeler chasepeeler@gmail.com --00000000000020dc340592d74c4a--