Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120182 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75707 invoked from network); 2 May 2023 16:13:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 May 2023 16:13:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BD5481804AC for ; Tue, 2 May 2023 09:13:34 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 ; Tue, 2 May 2023 09:13:34 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 45BBB5C0152 for ; Tue, 2 May 2023 12:13:31 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Tue, 02 May 2023 12:13:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1683044011; x=1683130411; bh=MR0/scE6Tk 6hnqJhPOmiIivJPTvZOtp/zGijIHGjFxo=; b=U3ciNx439Yq1f2U5d10EXA0BpH 8NZQdqF2waYR9n39YOVCWeYiK62QALTQbznFfdxlO304SBqnGXAStsdViUTc9et9 uAI4g+chSO5ZIWWU/6t9XqD+SAJxSG3JXhr5dCqHTypy2kGn2uWp0HYZraUNaGf6 FsDlKQZ6dPfbFjZMGapPc5+/J1B0hTF9d0+0T87hhin+HGgF5xTBCSpknAaTLb8q VwxDZ6bMssio+MKwWR/sN/MM/lUNYzyraCvPeN2cUpoH5nxicfHkMEOVkcQC/fmy Zj7JBcu9N1vOkLk1M/aKBIdFl3a6c7TfHmD/IKsSkAH1ApJ4gAa2bbaQrOgg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1683044011; x= 1683130411; bh=MR0/scE6Tk6hnqJhPOmiIivJPTvZOtp/zGijIHGjFxo=; b=X oHuhDKWd6Lc4rD7uGBmHhFdujYRHofoixjp+DCQiyOrbb8avMICwMr6LN2lc9wA/ dcidt9HVruiu2cMFPNPzS0VjmPxNga4GTto7e51qcQSqdAaTrwAOWbufjKRK5G6S jv3QHa0xV0GEE8s2MNcTXurzZZt/1ZeTqoCU/aHuEVClKEKF2Xfh1kKx8vztzmci L0wJMDkyhFNIDpKuDlCKytcXg7jk69SSteaS2mhC3QZ0EvmIEco0kpn7kACnmWup FRyRzjwmCKCIGVET+Uz/IxaF+LadV6+zDGlPK71Wy/h12DwAiNNT21GNDNPVQGuY wqrArc7GQ5NkRFRrUEV5w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedviedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepffffffejffdugfegvedviedttedvgfejffefffej leefjeetveehgefhhfdvgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id DDB6F1700089; Tue, 2 May 2023 12:13:30 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-386-g2404815117-fm-20230425.001-g24048151 Mime-Version: 1.0 Message-ID: In-Reply-To: References: Date: Tue, 02 May 2023 16:13:10 +0000 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures From: larry@garfieldtech.com ("Larry Garfield") On Tue, May 2, 2023, at 12:20 PM, M=C3=A1t=C3=A9 Kocsis wrote: > As far as I see there are more deprecations which are easy to fix. In = order > to see the whole picture > better, let's group the functions based on how a possible upgrade path > would look like: > > - With existing suggested alternative: > - get_class() and get_parent_class() > - pg_fetch_result(), pg_field_prtlen(), and pg_field_is_null() > - Phar::setStub() > - ReflectionMethod::__construct() > - ReflectionProperty::setValue() > - session_set_save_handler() (because the OO and procedural style = are > interchangeable) > - stream_context_set_option() > - Polyfillable: > - assert_options() > - ldap_connect() > - ldap_exop() > - Requires conditional version check: > - DatePeriod::__construct() > - IntlCalendar::set() > - IntlGregorianCalendar::__construct() > > (I intentionally did not include the FFI related methods, since this > section is TBD) > > As it can be seen, most deprecations have an existing alternative. The= 2nd > category (polyfillable ones) > mostly contains very little used functions, especially because the > deprecation of ldap_connect() only > affects PHP compiled with OracleLDAP. Thanks for the breakdown. I am also generally in favor of the changes h= ere, but am concerned about the migration path. The key factor, IMO, is= that it should be possible to run code without version checks across as= wide a range of versions as feasible. Needing version checks to run fr= om 8.2 to 9.0 is going to be problematic. Were we earlier in the 8.x cy= cle it would be less of an issue, but assuming we stick to the usual sch= edule it feels too tight on those. As Rowan asked, how much would it hurt to leave the date-related methods= available but deprecated until 10.x? I'm also not entirely clear how you'd polyfill functions that exist, but= change behavior. --Larry Garfield