Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120596 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57320 invoked from network); 15 Jun 2023 16:01:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Jun 2023 16:01:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 52CA31804C9 for ; Thu, 15 Jun 2023 09:01:52 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-vk1-f173.google.com (mail-vk1-f173.google.com [209.85.221.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 15 Jun 2023 09:01:51 -0700 (PDT) Received: by mail-vk1-f173.google.com with SMTP id 71dfb90a1353d-4711e85c7e4so81646e0c.0 for ; Thu, 15 Jun 2023 09:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686844911; x=1689436911; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=B7/FdbgjFdViUbvL7sNCpvRGh5pLFEg02bndgWM8H1c=; b=mV6FB+F83yOcRnN+OUgoWvOaFStemjqExMKrSTvRF3feRdMZZVKh81jKBcfLgS9Ftl 0nohZZmeLVLVkCBAlXXVGeRl+nLxsaUH6OgUZe/i+uQbQ5Mze/B+ekN4pmIeNaixfgAm VkSwxMnIH7fFrdNyA8/jAXGkgIcKQraWemIAbgU5hUffHTySgN4wgiTPyC++yuaWQS1i OqCeUYiJijapAAgL3Ukp+ZTAmsGKWnRvOAzCbB7LOua7Nzb21T+QuWRdxJ5Vtd0QsFQz iST9Kcn/R4oXRWxVAfkYs/HMV22rpO5Z+cg9q3Nx113gSTTGtlVBzZ/sTacJJgxYOEm/ FzpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686844911; x=1689436911; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B7/FdbgjFdViUbvL7sNCpvRGh5pLFEg02bndgWM8H1c=; b=cV/KGsdhqnri+nZHLz68qqwtL4HRYPMAw2XWwZUFedoYnb0ZA2Ag6Q2gY1ic6MOCFx ylhDL3OXgBFk1UMrMvOPyYmrrluBID5jucmz8QhHGKVRWoqfq1B2X5/1Brymna5EC9s8 xCZjlY9ysGaD0sq4Y3coZKICbQVnHSoV/dfkY3jUlqYBXVA69TJAlVEvoENdbGTMntSr O4cxJrEvj+BX4wVY9OgzAK8eRMQDfCc6V2Xkj/ysGkR0cX1yG6JGeZRufzeGkada62x+ sw1kUUBAIrHcCnCUULbyY6fehk7Wcu7d4EKPI8oV3TnHysBLKGwfQlwj4ytb70Lzebkk imVQ== X-Gm-Message-State: AC+VfDwsumOYMPlkvQ4iqp9BSVibllwQc1gummfmHYE/IUA9Iu2DoW5r YgQPAPM3RL6QQFyUrGXPy3oFS7LZf1GTIW+zNk/p1XN9XrE= X-Google-Smtp-Source: ACHHUZ54Px4hYkPLjFOI3FMstigX1PUBKliwazwyF5iWIyIT/EKU1n9yZnEZf7V9vyWZ56sNclHa20yBkG5LriyeL5I= X-Received: by 2002:a05:6122:a1b:b0:471:3765:e33d with SMTP id 27-20020a0561220a1b00b004713765e33dmr144292vkn.1.1686844910744; Thu, 15 Jun 2023 09:01:50 -0700 (PDT) MIME-Version: 1.0 References: <648AAE1D.9070805@adviesenzo.nl> <648B30B5.50705@adviesenzo.nl> In-Reply-To: <648B30B5.50705@adviesenzo.nl> Date: Thu, 15 Jun 2023 13:01:14 -0300 Message-ID: To: Juliette Reinders Folmer Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000b2493705fe2d2fab" Subject: Re: [PHP-DEV] [RFC] Interface Default Methods From: deleugyn@gmail.com (Deleu) --000000000000b2493705fe2d2fab Content-Type: text/plain; charset="UTF-8" > > I still believe this information should be added to the RFC as the risk > of adding new methods to an interface which collide with existing > methods in implementations of that interface is very real, though I > agree with Deleu that this BC impact is not so much of the RFC, but of > what can happen once the RFC would be accepted. > > While I can understand the tendency to defer this question to "that's an > issue for userland when userland adds new methods to existing > interfaces" (or PHP itself if new methods would be added to PHP native > interfaces), I don't think that's fair as this RFC is the one which > opens the door to that possibility. > > Smile, > Juliette > Adding a new method to an existing interface is already a BC break today and requires a major version bump, otherwise implementers of the interface will get a fatal error because they're missing implementing all methods of an interface. We can call this a "Userland BC Path" (how a userland can make a BC to other users). This RFC doesn't open this door, it actually creates a path which makes this Userland BC Path less "damaging". If an interface provider adds a new method to an interface (already a BC Break), but does so by adding a default implementation, then such a change will break less code than just adding a method without a default implementation because only code that already had the exact same method name would now break. One can argue that this change might make it so that users start considering adding methods with default implementation as not-so-much-a-bc-break and do so without bumping a major version, in which case this RFC could be said to "open the door for some users to start introducing BC-breaks without bumping major version" because they consider it a much smaller BC break, but it can't be said to open the possibility. Does this make sense? -- Marco Deleu --000000000000b2493705fe2d2fab--