Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127945 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 CE3AF1A00BC for ; Mon, 7 Jul 2025 17:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751907712; bh=gQ9pdHlhT4SVMc5XiL971pSXlb9NkcmkhzPDN9l/O+0=; h=Date:Subject:To:References:From:In-Reply-To:From; b=BO49gg0FYZ06YtEcm+Hzx3oOHKg292cI8ZVaeU1ezs6PcoIDJtNl57H9OZm05Dr6p oTZmu9LcCRgMBQ5zdAkDwneABwedenEZ2Cpxhr43IFvuDp0oBaHtnw0cFsRoODETFQ p98sKgR/RYi3ueEHzFLtH/gC3e0TLFNqMUPjTV0f05buxofnpkwFi5JFrGf3tlLcAd lW+IuxJiG197Z8Uj9uVRu+taP9UpBA4lJqbndwWanMbFlb99ddrzWaCK93rKNqTUL5 JDMmYxql1Sc81M+IKn11Q7rwcSEyiT0Ath2lzaOOys63pujUljirdM7gqxojmBG9fV 7EdGcuvEbDvWA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0BCFB180508 for ; Mon, 7 Jul 2025 17:01:52 +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=-1.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 17:01:51 +0000 (UTC) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-451d3f72391so34683355e9.3 for ; Mon, 07 Jul 2025 10:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751907821; x=1752512621; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=Dmpkp+qTogcWEdK7LrN885Mvkwzpb0+gTWVAwnOd84k=; b=ES4KKc/LJy7yJv/iFWyzmDLFkCnjrx6YvdZaRHHdtcbQcD8tfPHE2POuanfJxDwaF8 qDavoY7b05EF1/ocJxGMocWDKkBKw7uDqTltY3vO5hMjJ41c6MZ82Zb0eeviPCE8RrBH 1S9DAwSAsMQ/wFzKXNyKN4pCfFORfcpWFNa0PPe3njcY/oYksxKSfDUODQeKbpTNIT6j CJzLVLxwjOW7f4KU745YESmjAxU8/NZCD7ZD8RM1eUeDwd4zuQd5/zIqAxsnXbhyankf bjNp4xxBMu5jvyhjjUTzlRFqtBhxZTD5mdJmdCB4wkOlOjcEp5p15OSWiowTAe3Z89s8 waRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751907821; x=1752512621; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Dmpkp+qTogcWEdK7LrN885Mvkwzpb0+gTWVAwnOd84k=; b=oBPqcAUjGCs3rJwzvwPzP3ArQdKFz4uj24gJ9FsAZxvtW1C+YanRk6NbXhUC5E2HQN wnEaOl/PJ+PvANVICFOAokM0sifydu5/yJY7bSRec8E8KoSKTfYtqtWPfwTL1eWULJTc SBr8DKISplxlpR35t9SMAo3o++B+2BUmBkLKcsgSvdgzcACIJRfF+F4ahUWwTMFuUMjQ LWUh8CwrIDjZt1uVONeh7OuUCUvQ7ztStzQT0XrEG6TboFdEq6Kbsak+CxhJ/P3xTsBj kp6PLDXPpFLCYSNwW9RXTCbXqJNoIAo8G5nq+w/Wsj51W9ugTLPZ5Mrbefp09zPyDAZV BRhQ== X-Gm-Message-State: AOJu0YzdJk/i2zohAECZwcZ9FW0oXtS519OORVeP6o9PN/PrLB08KaW+ SxGo0z4vNOmKrLiZdM5QZij6oaOOYG8tIXh6fwndoNhQdfUAmBwupE50NXi0cZvK X-Gm-Gg: ASbGnctuAGgatrzkSzzQkgbt3TEX4s19RSaq1zxwiI7nScSXemp8fj+OsVPRdB6HkDZ KEASWTp0DBmhn5eBERNiZMx6Jc5e27hfICBwZ5pcOnLUBr5sCPaot1Wrc+1oZBgq/JV++mHcxGv K3RWhKnqF5qPQnL5LQYKmtLZ4EN+3Nh6QSX5NvuTKOOl79U4+klglqKITy1rs4bUzTmfRebwiI+ Apv9uPhnEqz2Sj8CwCw75fPnJxfK2oNOtN7EPpb84/IbsBbTYc/TYY4m8ged+AJNwpwWdTVnlm5 lBU1TuR/MFaLWuvza3tgYlLOTbhq2Zomq+lysw4iu9AeTfRHNNJhKJBIQRqQKkk8vdL++kXb2lG RbotsOo7Y0Yyhfwmizby6xIeWtjj0uTM= X-Google-Smtp-Source: AGHT+IF4gGExNdyP998C1gbnj2i8jPNd/qtxaCBr2Sl5MI7XuEi+Pk1jIvU6BrojTyW7QAPX953Svw== X-Received: by 2002:a05:600c:3e8d:b0:44d:a244:4983 with SMTP id 5b1f17b1804b1-454ccec0f59mr1686975e9.3.1751907820877; Mon, 07 Jul 2025 10:03:40 -0700 (PDT) Received: from [192.168.0.241] (178-119-85-231.access.telenet.be. [178.119.85.231]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b47285dda7sm10977267f8f.99.2025.07.07.10.03.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Jul 2025 10:03:40 -0700 (PDT) Message-ID: <3d3dfc56-3958-4997-9172-118d0e89950a@gmail.com> Date: Mon, 7 Jul 2025 19:03:39 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5 To: internals@lists.php.net References: <1yx0GE3X9ysln_bTni-MXXWHDPtPXcmPKaO6bySOiGjkjyFCMCB_wKz67XuEt_sifpZC63kkzreaNt4Trlrpir4MKRCgfkBV0X00cvQq1dA=@gpb.moe> Content-Language: en-US In-Reply-To: <1yx0GE3X9ysln_bTni-MXXWHDPtPXcmPKaO6bySOiGjkjyFCMCB_wKz67XuEt_sifpZC63kkzreaNt4Trlrpir4MKRCgfkBV0X00cvQq1dA=@gpb.moe> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit From: dossche.niels@gmail.com (Niels Dossche) On 07/07/2025 17:48, Gina P. Banyard wrote: > On Friday, 4 July 2025 at 08:04, Niels Dossche wrote: > >> Secondly, I'm tired of having to deal with useless deprecation messages. >> A lot of deprecation messages are completely useless for developers because they do not point to a reason or a replacement. >> That leaves you needing to look up the documentation, which is also incomplete. >> See https://github.com/php/php-src/issues/14320 >> Therefore, any deprecation proposed in this RFC that does not explicitly list the deprecation message, I will vote no for. > > I have added the deprecations messages for my own proposals, Thanks! > but I don't see this as a valid reason to vote against one. > The deprecation message is very much an implementation detail, and we should be able to improve it at any point. True, and I have voted against things before due to implementation details. > > >> There are some things in the list I don't care about or I don't have a lot of insight of its uses in, and I will abstain for voting on them. >> >> There are a few things I will vote no for: >> >> [...] >> >> * Deprecate using values of type null and bool as array offsets and when calling array_key_exists() >> Deprecating this would make the language more inconsistent by allowing this on array offsets but not on the function. > > I am slightly confused by what you mean by "allowing this on array offsets but not on the function". > However, null is not accepted by functions that accept scalar types, and bool would neither if my other RFC is approved. > Moreover, a type declaration of int|string accepted Stringable objects, however array offsets do not accept objects at all. I'll clarify: You're allowed to do $array[null], $array[3.14], etc... and the key will coerce. I expect array_key_exists() to behave the same way as keys on array accesses do. >> * Deprecate passing spl_autoload_call() to spl_autoload_unregister() >> This is very ad hoc, and as Ilija pointed out, we can't prevent workarounds for this. So what's the point really. >> The behaviour may be weird, but notice that people won't do this by accident. > > As replied to Ilija, and as Tim already mentioned, the workaround do NOT behave the same way as passing the function directly. Yeah, I misunderstood this. Kind regards Niels