Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127888 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 3D3341A00BC for ; Fri, 4 Jul 2025 22:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751667583; bh=maDTbChrh0uvODoB5+H4ymuYEwzYi3/CyQT3AAEsBL0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DXfP9y1EJ8/BrAjAZC/eSDIU1VMHpuWvGaUmrQHGXEQpjxHDGirnMSgMNnCLDoOpE ey9FD4WLGI5+sDyahEXM4cJSxgxmVsKmWgfkLoJvAo1DW/U6ylSW6rQjsRZ1nXlMVG 0jzLswfFB80seu/E0F+OuI01+qGbZLRhBUeBlCW8bXnomDWXXRhqNknV8wE7PYlpAd X7yboBqS1ofTl7AWWM5zGY82cWWKhmVu9/BlGJuukhn5iXa6lc+kgurdm88mMiAokq botfwQIqx84wV3xPf4RQoYtLY9I1fyqAd24+Jf6/N+Tu6GWwhPUH94tJJvqFXVfMoc jjs83CC/5M1LA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E23101805F3 for ; Fri, 4 Jul 2025 22:19:41 +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.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,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-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) (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 ; Fri, 4 Jul 2025 22:19:38 +0000 (UTC) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-714078015edso11527097b3.2 for ; Fri, 04 Jul 2025 15:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751667689; x=1752272489; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=maDTbChrh0uvODoB5+H4ymuYEwzYi3/CyQT3AAEsBL0=; b=Zij4P1w6gzoM+TH9pKbqJGzYUGg7aVLiLHO++4V8bNBX+98FRE+v7sTglq2mr3c40S fWocZuQNcBzuJPiNSnucvnN58htoAOro0smLDvfjMjZgh+38+mhBrJackoWEhDU2l4fl R+xYkUnb2UBcXp4GXCIWm4d0lAOI+XzNQRNDn2DskfYuq97uKWYHBGW/T9NR/SEi+WV8 t3I7e6Z+QZp6TTRUdtT4xAcm5ojqSDxevaAsVHvp3SDhMftn9oRlg61fR2GHnYuRH35R BjF6+rXo5PfpuzRmg0p0DKw+qfr5iYKwhO2FI/gCi5cdrwmElPeWO3e1CRgbVKy3vvGf yD1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751667689; x=1752272489; h=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=maDTbChrh0uvODoB5+H4ymuYEwzYi3/CyQT3AAEsBL0=; b=R9UrmG4cTJOmUcgBfGD5O7ZgQtsKZK195162WlTbZiJ3zxaS3W5Hel+p0E4E8jP8IU q62htPv1R5uUx9d6ByjLddLjZX9JFGSTb5SkS4XufFS8B62w5XsGw2k6M5ZuZfzDX3Bo qc2VwQv6azvle+dm9ZpdtDZTNSRRU93+++XlJFZlCFAlVgh4XCHWgH/EiQ1lpSfK2pR4 sNDbYJbwQUCRz5teuFjFcJL7gwcI/UETslL2KLr9/jiXrJJpGSNtP+jYwhx1apvinffD d3hVD3Nptslfwbngtt4OxO6luvCRDalOlU0nOyzMIInD1kS2vFi9GFkDdgBs8g7irAH/ 527A== X-Gm-Message-State: AOJu0YzMycFAO+pBM5LUDfBHj4HKOwEvip8nkR+zY/fd3DWweDM+6Yn5 GaNlqvB7E6mrjdvcPWz9c4lPPR5M3uCmSJrbDAlV1n3ieNKY8UCAASMnCPCyMF3mRcpy+TBNNKO jSvejlyczbs93IVZCdJgVqNcDBDjIDlQ= X-Gm-Gg: ASbGncv/etemShNfn4gyXvu5VgKm4PfaPDJL6LcKZjwBxBOekK5CChnovfeNbctk3mG L112xkm6n8oX90Ou31iAAVeoWryUltHMV7289aVY5fatQ+dVquuNT5HKIM9Ig1UrnHOdhhKexc5 UTiTsE2bs3xwn/iqEH52stIzfjqbZCymvdPXHh8jkbidGb1B/59995Y8Aeu8GyQFTlJP2rFVfEn IA= X-Google-Smtp-Source: AGHT+IF0IWk5yVOyY59tVoIJA5rLebhYMS23lk3mCXasUexTSmLGQU+GOPUHSObSwDYddpjGA9gJjr/Wwp/7w5GlXbM= X-Received: by 2002:a05:690c:6908:b0:707:dba5:2e44 with SMTP id 00721157ae682-7166b69b4a7mr51391747b3.30.1751667689300; Fri, 04 Jul 2025 15:21:29 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 4 Jul 2025 15:20:57 -0700 X-Gm-Features: Ac12FXwDaWGctXR30AkYWqSU9NuYbj8SgG95rhVdTygTuPuXV4AoOcqf3YaHXak Message-ID: Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5 To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000062a6d6063921ea77" From: daniel.e.scherzer@gmail.com (Daniel Scherzer) --00000000000062a6d6063921ea77 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jul 4, 2025 at 3:17=E2=80=AFPM Ilija Tovilo wrote: > Hi everyone > > On Wed, Jul 2, 2025 at 9:58=E2=80=AFPM Gina P. Banyard wrote: > > > > It is this time of year again where we proposed a list of deprecations > to add in PHP 8.5: > > > > https://wiki.php.net/rfc/deprecations_php_8_5 > > > Deprecate ReflectionClass::getConstant() for missing constants > > I don't have strong opinions on this change. However, > ReflectionProperty::getDefaultValue() suffers from a very similar > issue, except that it returns null rather than false > (https://3v4l.org/G2R3l). It would make sense to avoid more > inconsistencies. For example, ReflectionParameter::getDefaultValue() > does throw if the parameter has no default value. > > Good catch, I wasn't aware of this behavior for `ReflectionProperty::getDefaultValue()`. I agree that we should avoid such inconsistencies, and thus have proposed deprecating ReflectionProperty::getDefaultValue() for properties that have no default value. See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionpropertyg= etdefaultvalue_for_properties_without_default_values -Daniel --00000000000062a6d6063921ea77 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jul 4, 2025 at 3:17=E2=80=AFPM Il= ija Tovilo <tovilo.ilija@gmail= .com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Hi everyone

On Wed, Jul 2, 2025 at 9:58=E2=80=AFPM Gina P. Banyard <internals@gpb.mo= e> wrote:
>
> It is this time of year again where we proposed a list of deprecations= to add in PHP 8.5:
>
> https://wiki.php.net/rfc/deprecations_php_8_5<= br>
> Deprecate ReflectionClass::getConstant() for missing constants

I don't have strong opinions on this change. However,
ReflectionProperty::getDefaultValue() suffers from a very similar
issue, except that it returns null rather than false
(ht= tps://3v4l.org/G2R3l). It would make sense to avoid more
inconsistencies. For example, ReflectionParameter::getDefaultValue()
does throw if the parameter has no default value.

=

Good catch, I wasn't aware of this behavi= or for `ReflectionProperty::getDefaultValue()`. I agree that we should avoi= d such inconsistencies, and thus have proposed deprecating ReflectionProper= ty::getDefaultValue() for properties that have no default value. See=C2=A0<= a href=3D"https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectio= npropertygetdefaultvalue_for_properties_without_default_values">https://wik= i.php.net/rfc/deprecations_php_8_5#deprecate_reflectionpropertygetdefaultva= lue_for_properties_without_default_values

-Dan= iel
--00000000000062a6d6063921ea77--