Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127755 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 CFECE1A00BC for ; Wed, 25 Jun 2025 14:19:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750861071; bh=Hwq3+xqE033PTCnC3bDTD9wSuKlHhWd8ZrU6jGbjXUM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FFQ94GUDEoHT1V/9LplnIw8/uJF3S8dNHsy9Cto1j26lw38wlmjPIADavrK2RcNpV hUaybUFGWBYWqxavAmlVdfxqMhcku/TBTU5Ds7GQorRADVLUXWkYVkyW3zMo6gveK+ +zBQ09NHe9+jDcFNgHALqSBksjGcVqziPJLn/YaQAHkzHc634fd80yyPVe+JLNflhM 1x/mTMI4MagRGTcImItbFJtXE7t1GP4HXdoBin1VqYzuVS0s1tOHCcNJNN6wC6IykH 360ZEwTmZQNDtUK/NErz7WO5WsChL192zrJPoQCGhZ0XyCD0WX0LlbX490o8sgoAEI M+cwn4tSbzpDw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 614DD180387 for ; Wed, 25 Jun 2025 14:17: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=-0.4 required=5.0 tests=BAYES_50,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-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.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 ; Wed, 25 Jun 2025 14:17:50 +0000 (UTC) Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-e740a09eae0so1595940276.1 for ; Wed, 25 Jun 2025 07:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750861185; x=1751465985; 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=n3ErTbN/Pm75Wm0gKDux1yYUw94J8jmGfZhdrftYkas=; b=PQ8T1iNRvEdpXmkvv+1WwxKw1zlcbJVxpd5MIR70wPJHfTNTN6DfcD6jzwdSNyyKQM HxhXAV9Udc8S0DeTDzu+jFXU105Nx3Ukdz9eW4pZi+njysfMPiLOSZOPzhhg2iiKeiEM ufFuVRM7YJhSxU72Ye8ougnwsuxvMNmjEpFoY7I2UbJy/N7C+7zCD0xzcxHdxbhrYU22 Ouicae6IaHzftx/DbsQv3+1F1KkU6dw2qnoXwEox75BYihTgDRyKnza2eC2VCRfGws3R 11V4HYYz7YtNW/EYpFWAVY3rcjrIHjf4BMPgsV0CHFa12IuOCEKxdl7ZQy+sFdiIf/c/ C+dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750861185; x=1751465985; 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=n3ErTbN/Pm75Wm0gKDux1yYUw94J8jmGfZhdrftYkas=; b=DT2oWfTtSAwo7BmYY0yUVJCrxQH8mGatkgtOUFRbFXwv8qQHvh5WuxouGacFDJbweP QmtFIOvQ5JnkfjTD/9gkb2PujHXV9zHoERi7I25m4LMeuzD8pRPVe9ujaGY3iSXcO9zH +6er8Ow8yWt4lWirkU0MAjAMLVwsLUC0jAsDfpS0yGRk5P+w//Rvb2fwqtgMDksJPCkX JOxhQmCg/HeoJg7axCT+dUjVULj4pjx65VJ8FZwlnjgzsCeQQUS1ZJQgJpZYKciykgyn HuYExiDWPhE+htOYNxQfxK8n8KHLYFzm71qgrNN3ullt3nEE6/3VXWf+U94NDR3l3Ke1 XngQ== X-Forwarded-Encrypted: i=1; AJvYcCVhY2Wf9TkFaqOrUeFd+FudyB1imQummA0+1tHr9I6dQF974AYHU/7qLvDjmWR5seRtzAlD/aSza04=@lists.php.net X-Gm-Message-State: AOJu0YwRpah/vxkGaky8GJzdE3GXscgT7QQy3yXjuSuxwsXtqKbqDBo0 j/YiJsL36Eg9fFSnWYqjCfawlFE37CNnpm6ykHOvrUiOtu4zneMdfalX+pRRC9mBSUauX2WFBpg d3N4147i2mjvUz7KY+ccJYBF5+mbTAb4= X-Gm-Gg: ASbGncvZkchD2QEQiJm6i9Ze8sIAxSAFDW8T5Q8exEsnh3J0hLZ/zEx1XijNP/qJFM6 ma3mmHI0UN9e/eXQtHSzNSp4eiVKjq2ks2jOha9Vxp4+DJG13GgbPE/1+Mz8wsU4V0HBAyL0317 BThkgjDodSAcDLBhHAJJJuIATfy0F0U0HGR1eW9DOnbK8= X-Google-Smtp-Source: AGHT+IEqWiFE5aVEZs2yf639ONyiG9DFWsGN+RZuYEBpKvND2V6RQ64Ope4B/GtmYWsalg62E3GHFsyzu4P78CLEd2E= X-Received: by 2002:a05:6902:2b88:b0:e81:b2ba:cedf with SMTP id 3f1490d57ef6-e86016f1b02mr3878258276.15.1750861184719; Wed, 25 Jun 2025 07:19:44 -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: Wed, 25 Jun 2025 17:19:23 +0300 X-Gm-Features: Ac12FXwz4iNCI9VH4NFImbK9kNRmZT807CK8EBEAn2AnB-z6VgBnKpqnJPG1baY Message-ID: Subject: Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false To: Kamil Tekiela Cc: "Gina P. Banyard" , PHP internals Content-Type: multipart/alternative; boundary="000000000000f768930638662254" From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000f768930638662254 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 25, 2025 at 4:22=E2=80=AFPM Kamil Tekiela wrote: > What exactly is the context in which symfony uses it? > Was wondering just that, and I can only imagine it's a function call that receives the parameter as a string and it would getDocComment() result is passed directly, sometimes being false. Example: https://github.com/symfony/symfony/blob/a3c1d1f9e9bbac9933cc3792a55e756eca5= bb495/src/Symfony/Component/DependencyInjection/ContainerBuilder.php#L1177 I think that for those cases `getDocComment() :? ''` might be a faster fix and move on with it. And symfony already does this in some places: https://github.com/symfony/symfony/blob/a3c1d1f9e9bbac9933cc3792a55e756eca5= bb495/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMe= thodsPass.php#L53 IMHO, it's not worth the compatibility breakage, as some others might already compare it using `=3D=3D=3D false`. --=20 Alex --000000000000f768930638662254 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Jun 25, 2025 at 4:22=E2=80=AFPM Kamil Tekiela <tekiela246@gmail.com> wrote:
=
What ex= actly is the context in which symfony uses it?

<= /div>
Was wondering just that, and I can only imagine it's a functi= on call that receives the parameter as a string and it would=C2=A0 getDocCo= mment() result is passed directly, sometimes being false.

I think that for those cases `getDocC= omment() :? ''` might be a faster fix and move on with it.
And symfony already does this in some places:=C2=A0https://github.com/symfony/symfony/blob/a3c1d1f9e9bbac9933cc3792a55= e756eca5bb495/src/Symfony/Component/DependencyInjection/Compiler/AutowireRe= quiredMethodsPass.php#L53

IMHO, it's not w= orth the compatibility breakage, as some others might already compare it us= ing `=3D=3D=3D false`.

--=C2=A0
Alex
=C2=A0
--000000000000f768930638662254--