Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125779 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 qa.php.net (Postfix) with ESMTPS id 042D31A00BD for ; Thu, 10 Oct 2024 13:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1728567309; bh=0N4yNbGNrLkB/hone6lR0Zt8mCBn2eeRpRl2kjbr1iA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YirMDnvUyqdNMYYLWB4IW2N2l2fYp9s0JZzMAfNsr0xYy+b+7JuyXQSIkNifKYj72 oFvXOPL1BldOCTCq6nHoEHfy9FuIX6pGdCizVGk+bfOBVqKwAj6vUF9dlj+NIPNx0f 376iG1dijxum13ldVDAl+JDDUNUbspTSEs3Qq4JT674970Wx8RBWcdx7A3q4Nua9HF N8cjwc2gCSX4ScbyMYkTv1PPy+P5fwUful9+dBYjQB/UORlNzhPi4kSmEdQeVwonfB pMzMG414x6Ey1LAzAF/rpa9U8RL00uC2+9Vf1OnTNe4gZKzqgV6Rv3kKzLkJU3AqaZ CpzLBD0332BLw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F17E718007B for ; Thu, 10 Oct 2024 13:35:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,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.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 ; Thu, 10 Oct 2024 13:35:08 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5389917ef34so1048847e87.2 for ; Thu, 10 Oct 2024 06:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728567169; x=1729171969; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0N4yNbGNrLkB/hone6lR0Zt8mCBn2eeRpRl2kjbr1iA=; b=Jym8gxMbYxxD6kVBYkrMFoWUp0K1PEizheFyQSGskbArIH9G/kBrEGWzBVnRbwmzvZ Kmni3uLFoLccJIpTuj9JY9wr4bmu05jfcOwGSLywUuRMcJZPNoAjcjXLlR2USJxa9YA5 XhLYivtYpmLIi7ppmpIPptYirSsa0I+sL4YzrYskIo3P9nmy5G9OaoNa8MAE8U0bYg01 Gb4Hb7H0IP2koyQa1URLJBRrJUBKFAZevoKe6Cd4/qRofj2kQ1XM0Z1YqXOjTJ5rWVHC c6WhElaO518qOVpg3acpUFQiNaOBnU2hejQEAmOBN5L9CV0ZjVfkHbrMphl3E9QHaKR+ yLiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728567169; x=1729171969; h=content-transfer-encoding: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=0N4yNbGNrLkB/hone6lR0Zt8mCBn2eeRpRl2kjbr1iA=; b=MhrXz87hrsinEDWEJ/GkcNdbjrinI52P3N7g8+C7kWRScZn91b/i+m2C8mh6o/sORI j/b+XY9BPkWO7w0yevoDLZVLCNWnctXNGfvTDhdM7e5QU8OXvD+fVBy0dkIQw39jqvmS RfEvmjsmnHbTIcsGpx1Y+Ip+lQd2Oz5r4CFxF08QaBDIhvVx4+CQ8Raa7nnqdzqdir/g ctR5Ml7W8sRtMooky0uwmHAfgnR0jeB2+qCa8SZJ/tnYsRFawBkp7rPUc57/zlM5XcmF 15d3Ovpgq40irmlsv+m9HmVan9Iim14C+i+aqAy/5cVkhILiQobZNXMydTu+7FBrGt/4 62bw== X-Gm-Message-State: AOJu0YxYJU4t2gx4ZhumWZ3adbatVzq6npBO/8om1SBdeFfB4eLTvMPr EfND9Ja25fOtbjERFzx0DuEW8b+M0Yuof2ytx4o452G6kPxIyTcN1/DvctR4ps2Cj+PEfpDcDCK F3fHtpBxq1sYTT7FAm+02M8D0r1XyxNJKcQ== X-Google-Smtp-Source: AGHT+IGIPAjQHjYOhaUyq01hejs92HePusYb2K02pkk8NQSCaWalbMW9+wACqBjvEZzf4IxUnTqsHX/M/QzzKl3IBQ8= X-Received: by 2002:a05:6512:6c5:b0:536:54df:bff2 with SMTP id 2adb3069b0e04-539c496feebmr4021644e87.54.1728567168991; Thu, 10 Oct 2024 06:32:48 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <2A7CF24F-3AE3-4125-965F-C65431C42DFB@gmail.com> In-Reply-To: <2A7CF24F-3AE3-4125-965F-C65431C42DFB@gmail.com> Date: Thu, 10 Oct 2024 16:32:38 +0300 Message-ID: Subject: Re: [PHP-DEV] Asymmetric visibility is a BC break To: Claude Pache Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: udaltsov.valentin@gmail.com (Valentin Udaltsov) On 09.102024=E2=80=AFat 19:20 Claude Pache wrote: > There is no BC break, in the sense that code that worked under PHP 8.3 (a= nd therefore use PHP 8.3 features only) will not break when run under PHP 8= .4. > > Of course, code that makes assumptions that are true when using PHP 8.3 f= eatures only, will need to be adapted as soon as PHP 8.4 features are used.= This is unsurprising and expected. Hi, Claude! Thank you for the explanation. I now get why aviz does not break BC :) Until now, I was worried that we were missing something important. > That said, https://github.com/php/php-src/pull/16209 is interesting to ha= ve, but not mandatory. The current `ReflectionProperty::isPropertySet()` an= d `ReflectionProperty::isPrivateSet()` might be somewhat confusing at first= , but they are sufficient in order to obtain the needed information. Yes, they are sufficient, but very difficult to work with. Just to check that property is writable from global scope, you have to do `isPublic() && !isReadonly() && !isPrivateSet() && !isProtectedSet() && (!isVirtual() || hasHook(PropertyHookType::Set))`. See our discussion with Ilija: https://github.com/php/php-src/issues/16175#issuecomment-2389966021 -- Valentin