Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127715 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 6CF301A00BC for ; Wed, 18 Jun 2025 21:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750283156; bh=jPBN0yei88UlTmm5Y9CWkCBXg3/mzmCvtSKsDNr5dk8=; h=References:In-Reply-To:From:Date:Subject:To:From; b=ULb2BQzEEWNUYs0hb58xX2T7InxYz9sgNLwEpSyIAYvf05BdSe24jT4cpNCrLduhG Ado3cl1ytAnjmBy4JHJMacvjhNIh7fFbF+JpMdO3UqxI6aMN5B86RkjcwWjOfkl3LC 5ZY1We+ayXHwquv5kE/Fe8bd8ZevbwWtYJVwGqyn+1ulTS4BI7EqWgSxvkS8zP7mIt rRXgCWaOgg/AHjaqFbS7s7b0vRAves4drBoFsdnh/HNOcm2lVTOeT/Iu17vOW7ZY8d Na5XnVmg/mJNBSuvmkDRKaXQ2uAtIYj9O06M59bO/r+mY8vgmQQGpAy5T89pKsZZFq AX11orB8GpbVA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 52B04180056 for ; Wed, 18 Jun 2025 21:45:55 +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, 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-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.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 ; Wed, 18 Jun 2025 21:45:55 +0000 (UTC) Received: by mail-qv1-f44.google.com with SMTP id 6a1803df08f44-6fa980d05a8so943506d6.2 for ; Wed, 18 Jun 2025 14:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750283272; x=1750888072; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mbXoQRIftMJqB2CpvyxWOx3OZQguZb7zqRvLs880eYU=; b=foF93uNO4U+L0BXihatoXJM7kDr8xVN2TIbLQF29+YqS/w+zYfqhP5jAa+QKKXPlyJ PQoQO+Fv2nikJtILfqj6+NcAxViPjAvFZcDbuRdhL/yDN2sqOR0fnpHljHvG6s/gdldd nlDtr1PmbFHLbk34EvrYN/2S8zSxgslF4iBhTTR35lUxPukuR46cbxywIP0LfLlV2SNK 3OBkwqmRYspy0cJEC59v+eLXF3vPOel64yk3c68kIueftdYExw562bR1xA92a19Z7CBU /s6a1IjDKT2ilwcNSZ1P96UoM3xdy8X//vTGSYe9NtbZvtz1ADn1XPvcntnztBIcsTT4 0y6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750283272; x=1750888072; h=content-transfer-encoding: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=mbXoQRIftMJqB2CpvyxWOx3OZQguZb7zqRvLs880eYU=; b=kmGVgg7GtmrwyHvYqV/iPPES8TOKDgDNzvjnfVyos/huBrRedMwrd0FSdnaKeFMLtu uLPeoXBPi97MyJDsLwX+kuurOD5N9KvO29r+lBZUVfTaQh1uU5wpnkcz5cc+jZW/CBK3 ly9bhtB6GOAEz/yZ+3UHxlNih47A8CuWi8DK6Mr+KT0cAEpxe5IKW1Yt23aVIiicnnPd zVnKVsF2cr0KyHWg3kC7vakx0kEo0YQBnCsIX3th34lTv1Ir7CfxmNMzqTIt623OEYo+ ZDaw4TpZzfks+mfkT7Xnh0lR8dK2b+Ogch9rNLJZGPQhppcXUAFE4gawzcc+v5GKZKVq JfYg== X-Gm-Message-State: AOJu0Yw4WxndZ6DI623EmfXLmUKdbvXUUjAbV6PfYzsTSMycKWuhn3vD K/BE//xkI5JKor+OZKl+LGe1hzBvh2SX5RSee7mrNygzMjfQFMOOXw2SAGhk26A5487zY9NvBcW w3dyg95qMH3ytqetKwJRpOTi9HYykiCKWVPCNx2xGrg== X-Gm-Gg: ASbGncsnCGi6iYd5zeaww8jorzVxN2nSYnoE5z7aW+a7hRdYcWBWtZ5eibgmgR5Zf3T hUhupNKkw6mMK1jIqwZepqbIhdX1Crmou+DLasAaZgWQHqERCbbcLZRkrQhGUyNFu/vSeiih+Md BEoZdYO7mnplX4GjBLIJU0cP5iES52NYHqBaIyPPD6dnujcRanJZuv/390r7hpdU15Ieoeo2oq/ YPbag== X-Google-Smtp-Source: AGHT+IHa13VvVI1ERGhyd0h6hS41tkEUCoeBoM5C6uH9vJlBOXdEqI57FyN+lJwl9LRTLHTSQgxebeI1xg7ZBkqEnxM= X-Received: by 2002:a05:6214:b6b:b0:6fa:bbb7:602c with SMTP id 6a1803df08f44-6fb47779079mr257060346d6.29.1750283272335; Wed, 18 Jun 2025 14:47:52 -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, 18 Jun 2025 23:47:41 +0200 X-Gm-Features: Ac12FXywhrewJ-zISvdKDVr5f_QUpc0Cg17l-JL7uqp6bOwaVkQomBq_ftvtVng Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] #[\DelayedTargetValidation] attribute To: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Volker On Wed, Jun 18, 2025 at 2:23=E2=80=AFPM Volker Dusch wrote: > > On Wed, Jun 18, 2025 at 1:28=E2=80=AFAM Daniel Scherzer wrote: >> >> I'd like to start the discussion for a new RFC about adding a `#[\Delaye= dTargetValidation]` attribute. >> >> * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute >> * Implementation: https://github.com/php/php-src/pull/18817 > > > While I'm in favor of the RFC, I'd more like to see the default behavior = of internal and userland attributes adjusted to work the same, with both ha= ving delayed validation enabled by default. Treating core attributes differ= ently doesn't make sense to me. > > So, if that's someone you're willing to work on, I'd very much prefer tha= t. I wouldn't support that, because internal attributes with effects are not usually instantiated. class C { #[\SensitiveParameter] // This doesn't actually do anything, only works on parameters public $prop; } I would get no indication that this attribute doesn't behave as I expect. We have at least a few attributes with confusable targets (SensitiveParameter, Override, Deprecated, NoDiscard). User attributes can't have effects without at least reading them through reflection, although granted they don't necessarily need to be instantiated, and so might also not trigger the error. Ilija