Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127928 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 5F1F81A00BC for ; Mon, 7 Jul 2025 15:18:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751901412; bh=UxtRykUPLPsug+JEWWmp0ol8xR5N3MsJhXclRBJJHNQ=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=h40Qz+LKICiRSc0Kbs60goDBQFhFb5slbOFNHGEzw58OkK6DjqXcgsW+PSpqr19As bTaLCEMPM108bpADPhbBTTqwRwQd0HHdEB3kgUNrdNBQ7nIU1S/dDwp8Sb6vclH8Vz njUPBlD+uO7IcLXR1iuIuk9t108KYl+xOrrK+TmMhq5GTmlNeezJrATcXjQMPKvHXG AyK3R8xI4JNpcA3LvLZ6b5dN4WfTKBSmDxuvxI9HFIDVZhkmezd2qpXy6uwbNFgV/J pe4YGtJfemu03auvHWRShClI4jUeQi4Hu2+zFTJg/SzMAP4U4OMnw3RHgltjjQ51yQ 1n1TCtlWB+Z3Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 55477180068 for ; Mon, 7 Jul 2025 15:16:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-24421.protonmail.ch (mail-24421.protonmail.ch [109.224.244.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 7 Jul 2025 15:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail; t=1751901518; x=1752160718; bh=UxtRykUPLPsug+JEWWmp0ol8xR5N3MsJhXclRBJJHNQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=hKPsAblUQJjGNrTBKjxFdoy+5QyYgkdTpz02+PRbv8dqMG1gSciHyfSuo9LFJ6x5m UPunplmLYP8eWh96Lzfaj2rBM45XJ5Jzdz8WvAgli5hwAaaVOUZ/YQfdDiofdW57w5 lcFZingMe2XtDFORir7dRNMhrtXOHzYrmJ4caRQoddsBvswONgpSRsUjE7WjTL48/6 kEK7yu/emn9swVWtI8o4bbl0qUSbd+PvrA5fKDBSAeJfwW7Eu+CBREW+LwIGnwmx0y R8IN1Vlu6bXTZYR0xULJAaMUrDl3ucnSvVnnU2frrifBGTBE22Y4m+7fShVkepEoHi hxSy4Fn7mduJg== Date: Mon, 07 Jul 2025 15:18:35 +0000 To: Ilija Tovilo Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5 Message-ID: In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 64be96c5b7e9b42fa0bb90ee43a35435b4ca0b82 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Thursday, 3 July 2025 at 15:49, Ilija Tovilo wr= ote: > Hi everyone >=20 > On Wed, Jul 2, 2025 at 9:58=E2=80=AFPM Gina P. Banyard internals@gpb.moe = wrote: >=20 > > It is this time of year again where we proposed a list of deprecations = to add in PHP 8.5: > >=20 > > https://wiki.php.net/rfc/deprecations_php_8_5 >=20 >=20 > Thanks for the bulk RFC. Some thoughts. >=20 > > Deprecate __construct() and __destruct() in interfaces >=20 We agreed with Tim to remove it from this RFC. We still think __destruct() in interfaces should be deprecated, but there are other interactions with __destruct() that should be on the ch= opping board, so this is punted to later with a comprehensive proposal. >=20 > > Deprecate using values of type null and bool as array offsets and when = calling array_key_exists() >=20 >=20 > The introduction section also lists float as a type to be deprecated > in array offsets: >=20 > > Deprecate using values of type null, bool, and float as array offsets a= nd when calling array_key_exists() >=20 >=20 > Floats used as array offsets that lose precision already emit a > warning. Can you confirm that floats used as array offsets that do not > lose precision will not start emitting a deprecation? Correct, that was a left over from a previous iteration. This should be fixed now. > > Deprecate ArrayObject and ArrayIterator with objects >=20 >=20 > Just to add another issue to the list: It can also change readonly > properties of internal classes that the engine does not expect to ever > change. For example, Enum::$name and Enum::$value. This can break > internal logic assumptions (e.g. hard-coded switch cases to handle > internal enums by name) and cause memory corruption. The same goes for > non-readonly properties guarded with the internal equivalent of > __set(). Added this as an example > > Deprecate passing spl_autoload_call() to spl_autoload_unregister() >=20 >=20 > Is such a check actually useful? We can prevent > spl_autoload_unregister(spl_autoload_call(...)), but we can't prevent > spl_autoload_unregister(fn($c) =3D> spl_autoload_call($c)). It seems >=20 > very unlikely for this to happen accidentally, and excluding all > functions that don't make sense to pass is not feasible for obvious > reasons. But I don't care too much. As Tim mentioned, this is not about preventing workarounds but removing the= ability to "flush" the autoloading table. See https://3v4l.org/GVl7Z which showcases that a "proxy" call to spl_autol= oad_call() does NOT behave the same as passing it directly to the function. Best regards, Gina P. Banyard