Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116149 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82566 invoked from network); 23 Sep 2021 17:06:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Sep 2021 17:06:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2BD5B1804A9 for ; Thu, 23 Sep 2021 10:47:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 23 Sep 2021 10:47:34 -0700 (PDT) Received: by mail-wr1-f43.google.com with SMTP id t18so19603153wrb.0 for ; Thu, 23 Sep 2021 10:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=eZjNfCAGkS9sd1Z1ZqzJWz5gzFrVKmIJwcyayTYmh6E=; b=DOX2W46yJi84sS4boJiwa84sCSnCzaiAqTNSjKj+YYRfxmbjxE2D0F8uqaHqHK+kJi bjesziNwodK/gCGCxaPHEzqfEAph+A5CloGmGfDBbDdN+N3qY4A4g+O0N6Z6Apgm29El OibtRCoMoBQl86IST4Gz7OONjRFXvL4TeBwhxcdPPcCznIL89gBcoG7trdJExT2Lo2Lg i8hCqKFz7B3BxfDffUZ1qOVcJkmS/XIBoozrCdQqfxWwHA8s58bsxwdeO51shS/fhltU TQ/IE9fTCTzYhIeDfY5xbhgNZc5rGhcst6QNdBuvXHmytMvefV0ronbgkaqTqm0RZSxQ 0eBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=eZjNfCAGkS9sd1Z1ZqzJWz5gzFrVKmIJwcyayTYmh6E=; b=ExVjp4lVApHThVC6JyfGoHrFRF9fsqwlw+k7n5MO6neY3p5zwcH+3W2dKY6rOOJ0G3 tLJCJYlWv+bIscqvbLsJLZG+pslL8lrKJUd3PlglLlRKeiHZI10ZZf18Yg9Lm3L7xmiM +zyjbrbUTvIyq+YIIxuQKLU0q7ixXSb0x6T+MS9vZvkxK70te8O4P+D92LpisC0CSr5R oJ7mvy5UkIquYuZEG/xLkxZqaR/Rqh3VciZeI9zar32kWqosZ920ZLq/DIZOtVu32KBt YwRdjJtkfRzDgR8tWgDkmqpbGgUT8OtTHi2XQX0mAvGw3337sV/YhgYilUIPrwRgYsoH mvvg== X-Gm-Message-State: AOAM530MGvy8H3YZJp4PJYjVOWgmxUohE4EtP1LVBgPOhAB12dNqFkg/ z715kqCf5aMW8qHOwKaAiyKkDy02w5k= X-Google-Smtp-Source: ABdhPJzrWgsogmaO7amGeUNqZCvdl2H3NvI2y+fEeLHIfK3tIYWuvN517pliKJz209HAW6iiMWos6A== X-Received: by 2002:a05:6000:3:: with SMTP id h3mr6681523wrx.408.1632419252580; Thu, 23 Sep 2021 10:47:32 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id q126sm9564770wma.10.2021.09.23.10.47.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Sep 2021 10:47:31 -0700 (PDT) To: internals@lists.php.net References: Message-ID: Date: Thu, 23 Sep 2021 18:47:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] BC breaking changes in PHP 8.1 From: rowan.collins@gmail.com (Rowan Tommins) On 23/09/2021 17:52, Nikita Popov wrote: > If we dropped > all non-deprecation changes from PHP 8.1, the upgrade would be a bit > easier, but not by much. This is not where the main cost is. Be that as it may, the question remains whether *the particular case of is_resource() and get_resource_type()* could be made easier. Was the option of having a "Resource" base class or interface ever discussed? If it had a method called something like "getResourceTypeString()" then get_resource_type() could do (the internal equivalent of): if ( is_resource($arg) ) {    // current logic } elseif ( is_object($arg) && $arg instanceOf Resource ) {     return $arg->getResourceTypeString(); } I suspect as 8.0 and then 8.1 gain adoption, there is going to be a lot of confusion around the resource -> object change. Most users probably don't really know what a "resource", they just know the boilerplate to use. Regards, -- Rowan Tommins [IMSoP]