Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127748 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 C55D01A00BC for ; Wed, 25 Jun 2025 11:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750852459; bh=ZjSF/hTpAJJkJsbL5GNMN1gW11yUF9WaJcr8colE8NQ=; h=From:Subject:Date:References:To:In-Reply-To:From; b=IsX31Km9kSC0GrAbLa6QnNFL8GbgGBKufBUhV5m9hrd14Zv18fXdIioZJHefT3mKm RiZWDZLdcUXy+kRTZrAC99QIlFAME/PpeVoaKUiyj1VRZWqfrY0OUMzqtzi8niIol5 cuPJZyU1/bx9qWgenenGb6Ilr0+6Ru7KLPa54SHaskKRXf/o9NH/bljEL8ecRohhZA j4Z8cTFMoSSW0Uxmv1ZXJgWEJ90B0GeaWzSUICjO/CV8c7lVW/HAqP5Dp3oircuZUJ IiZaImtQEpGdD7Q41Z9mx9q9cHGro3/y4SCnHZ933EGERfnuUzN4+YuPtNY/of3rGo yyajblDL5Ku+w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 91CEC180088 for ; Wed, 25 Jun 2025 11:54:16 +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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,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.gna.ch (mail.gna.ch [212.45.196.109]) (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 ; Wed, 25 Jun 2025 11:54:16 +0000 (UTC) Received: from smtpclient.apple (unknown [194.169.219.181]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 55B5E3A0CF5 for ; Wed, 25 Jun 2025 13:56:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1750852570; bh=ZjSF/hTpAJJkJsbL5GNMN1gW11yUF9WaJcr8colE8NQ=; h=From:Subject:Date:References:To:In-Reply-To; b=YXp36ShSv2FVRGZgc4mj3jxWeH+lfswD0sUdUpToEK1At1UVDHL6XuJDtbJodzMrg NLUj83UQe0Esauz1pV/5KYul5hpbF2h/Nd2EGaWFubnofj6UYuoTetEy0710AFgy9n Ekcz5HeQuOlcnth1A9Pb0HDLrn2Neg48BVVgPJKk= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false Date: Wed, 25 Jun 2025 13:56:09 +0200 References: To: PHP internals In-Reply-To: Message-ID: <2108D675-AEF0-410B-9BD1-E68BFEBE4F9B@cschneid.com> X-Mailer: Apple Mail (2.3826.600.51.1.1) From: cschneid@cschneid.com (Christian Schneider) Am 25.06.2025 um 12:37 schrieb Gina P. Banyard : > While working on the deprecation to/from bool type juggling in = functions RFC and seeing the impact within Symfony, we found a common = slightly annoying case. > The getDocComment method of various Reflection classes was always used = as a string, and we thought changing the behaviour in PHP made more = sense. >=20 > I submitted a PR [1] but was asked to gather feedback on the mailing = list. >=20 > Please let me know what you think. In general I like out-of-band instead of in-band signalling as it seems = more robust to me. I am a bit confused why it was false in the first place and not null as = the absence of something was in my book the definition of null. But then again I realise there is a general aversion against null. I noticed that the "empty string for absence of value" was also used in = DOMElement::getAttribute() but you can argue that the existence of = DOMElement::hasAttribute() fills this gap. Anyway, I'm not a big fan of this move but won't fight it either. Regards, - Chris