Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120639 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 47713 invoked from network); 20 Jun 2023 08:22:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jun 2023 08:22:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EA13C180543 for ; Tue, 20 Jun 2023 01:22:08 -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-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 20 Jun 2023 01:22:08 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3f90b51ab39so29546685e9.1 for ; Tue, 20 Jun 2023 01:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687249326; x=1689841326; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=NkmHaNhnGTkC9r5lzsBFgsuIDCaAJsnn8+emEsnkU9E=; b=q1E/a1/erUSMW6Vv/aSW+bjZUfullV97Jz5epFWPlA6IXitJQWIfmwxSh8KFll+QW/ GLYPBTDQf+EE+vraQFtra0gSWoVdgR4CNc82vcLW0crMZJ7WUrsYFLoPQNKovo+QnyH5 Kh3j8E1LySW0/c/CS97RPOv/PyCxbJ69qShW6AKt/NoY/7Okyw9xAZNr7UlElpIHf1qT 9zJLMDewayQV/+wH3THi8L3Sa4HJlOLGU9RMPErHX3Ijt4v9+nSU2q4x8LjVWiXd1kL5 ySRPa9TuNUJVKgJF2a4Rj544Ubq/RGoC9ItVI+0FB3PvuFDaRFDLwbr0ksVDn5XC58pl pIzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687249326; x=1689841326; h=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=NkmHaNhnGTkC9r5lzsBFgsuIDCaAJsnn8+emEsnkU9E=; b=fnP5p1XOs2QtUgXF1vMmF6RArRqEVP4kG3JDwz+ZzQW7aR52jnB+lwk26xPd/g+O69 nqzkgSj636vKLIoUNEML379mARr0IJ1B4C7cGENOyu/luFLb886RFG10tPqDIs9i4++N j63dITeIV43OqL2L1ho10nyiU2xEGrCEHxmZAQXIXXDplqf4me0QzsqGmYS4g0z7OhUD gZgnfldhb4QlD/edxMbd/9p/F9IbY9fPcCHEDz5vI3tU0SH/32ZDb1QrGDN9WJaK6YmY vV+M8+UGLdSVGGZz83lTVpchwqMPk2YnEP+BQnTL0guNNL/GFfXLFTBLfl0BCzqv60x7 bw4A== X-Gm-Message-State: AC+VfDwLQZVZ021Lr7N0o9+0sNgSVNZs6kmiTbCYgWl/yZO3cwxO9bQq 6Vy0VrST81aJum7BrEdw/6HQV2XVIc96eo5zdr4HKEXcP0s= X-Google-Smtp-Source: ACHHUZ6DYBKxIegxnz2dRWoZMFq/M2zPm7zLeuvQqFn/QNSYolx0BW+/ceVm+hcrniByjLBG7Tkt8Rh0TASsppKGo3s= X-Received: by 2002:a7b:cb56:0:b0:3f7:e48b:974d with SMTP id v22-20020a7bcb56000000b003f7e48b974dmr12670858wmj.27.1687249325831; Tue, 20 Jun 2023 01:22:05 -0700 (PDT) MIME-Version: 1.0 References: <108411AD-DBC4-4436-8190-7569B7A0805F@gmail.com> In-Reply-To: Date: Tue, 20 Jun 2023 10:21:54 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000b6bbed05fe8b58e2" Subject: Re: Fwd: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000b6bbed05fe8b58e2 Content-Type: text/plain; charset="UTF-8" > Then, among both options, we need to select the one with the best future > > proofness, and that's definitely the OOP one to me, because it comes with > > more guarantees (type checks). > > > So are you saying we should deprecate the function-based version > completely, and not provide any new names at all? I think I would prefer > that to the confusing set of aliases the current RFC text proposes. > I was not but I would be fine with this solution also :) > I think I would support any of these options: > > 1) Do nothing. I don't see the current situation as being that big a > problem. > The problem is the overloaded signature, which Mate explained in the RFC. > 2) Deprecate the function-based signature, provide no alternative but to > switch to the interface-based one. Potentially non-trivial upgrade for > those affected, but leaves us with a single clear function. > Would work for me! The OOP way can be implemented since more than 10 years. > 3) Create new names for both signatures, treating neither of them as > more "default" than the other, so that users have a clear choice between > the two. Deprecate the existing function completely. > Deprecating in the same version that provides the alternative would create a lot of friction (even if in this case, it's possible to polyfill, which makes this a bit less rough). So to me, this path requires providing an alias without deprecating the OOP version first, and later on deprecating the current name. THIS would create confusion to me, because ppl would have two names to choose from, and many won't take the time to figure out the difference. Mate, WDYT of 2)? Nicolas --000000000000b6bbed05fe8b58e2--