Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110265 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 9499 invoked from network); 23 May 2020 02:55:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 May 2020 02:55:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4B6091804C3 for ; Fri, 22 May 2020 18:34:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8075 40.64.0.0/10 X-Spam-Virus: No X-Envelope-From: Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2054.outbound.protection.outlook.com [40.92.51.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 22 May 2020 18:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdvKmW5/vHFqMbu32Qz3v7TSSuu9rWhZcU8lAdbHEU9d+vSYUKN7z4GHF7GAch7Rg1EQx5mF5szcI9RXhjBywONsqH8/3affIk4wA04ijyOTzgkrJIqIs2tIQ9aBpl29qoFR5CwgAYWu+WNOHc7k9o+z9aEWxtfi9u5j1UGRn/W6afnzuW4WgpHQDgSHbf4K5VJxISGDY9E3+ZggRsWvRW8pde1qx4Aw/CAEkH+6HtTRFCmU9Fd8tgJJ/4P2QT9XXcYFFfS5TZUkca6Fz6UDTgbzGtLkkIW0d55AUipUdDR6XoWwO7Gi4y4OU8xxU3PUNLcndh5lcG5znXlL7Var8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3BN3oz1lrpsD2Jy+sM0a3rkT6OEXezi76xVDk7uynwY=; b=boVpqz3O3k5ICIlOv7qRXPPAmdokrq6us+k58igHHYqlTVp2x+kPu5DhvDDPamcLlbzTXtZs3cztmN4kdjpEjoq9LAB2SK7eVoxUMjIz3Bd1RUsWIvWqhwBNIm+vFcY7AGxOIP/dDshr2NffR1EcoChHDuKix7UOZKzkEl0Jg0rk5cALVTgV/OqqVWzC15UXyAXkU9ADKN2rDKYRKLbzIGKW9nQY6+yIxk9cIY+cRtGY9i4/guw3D59eUDnjd2dpOev6SgivSgyg91ztHImD2qfx29TSxJaSb0hqUgOymfWYCU982rC8YHkAfuTMznFA4VQI/IpArxtlBxYlX4KdQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hotmail.com; dmarc=pass action=none header.from=hotmail.com; dkim=pass header.d=hotmail.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3BN3oz1lrpsD2Jy+sM0a3rkT6OEXezi76xVDk7uynwY=; b=MdbA4tS83SYa9DuGLzr56jx4DQC06AYFzTd9lGw7xHMaNNkGLzSSaiiYsNHnp2rtY54alZdIw+DZPmi7HvzMCJJ5ywCSE2dyPiG/txBViNm14e0DP/6dJheBYUlnzuG77X8XRnka9yK4rVEJRc9G3J8C1nqQOjCQwdTgFA8MB3s1p9DhzWZFYoiKF3Ur6UFB+S5qR/OiOVk5MUeZ1oq627UB+MgCZUIvg5Drz6Cd7oHvEaVlcpUu3Llhs2GNB4fZCN7TQLzK4UH2jTF4bzN3CUoLCNIC4XwPa3m2rDxgrOx9rbIqLm9PHBC1ld6G0FcpUqzp+PmIrbKOK9hb3WcYGA== Received: from DB8EUR06FT017.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::49) by DB8EUR06HT003.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Sat, 23 May 2020 01:34:48 +0000 Received: from VI1PR02MB4703.eurprd02.prod.outlook.com (2a01:111:e400:fc35::4a) by DB8EUR06FT017.mail.protection.outlook.com (2a01:111:e400:fc35::113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Sat, 23 May 2020 01:34:48 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:4D42353AAAD1846C8D2D6E18B346C5DE802FCA662107DCE05803F4CAA87FA4A0;UpperCasedChecksum:7D83B3F880A3C15DE3516A9720566BEB3E7E20B2328B9083BF7A9E5E3DB0927D;SizeAsReceived:7919;Count:50 Received: from VI1PR02MB4703.eurprd02.prod.outlook.com ([fe80::61d8:9f5e:4baf:492d]) by VI1PR02MB4703.eurprd02.prod.outlook.com ([fe80::61d8:9f5e:4baf:492d%7]) with mapi id 15.20.3021.027; Sat, 23 May 2020 01:34:47 +0000 Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Sat, 23 May 2020 03:34:44 +0200 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Nikita Popov , Benjamin Eberlei X-Mailer: Apple Mail (2.3445.104.11) X-ClientProxiedBy: PR3P189CA0011.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::16) To VI1PR02MB4703.eurprd02.prod.outlook.com (2603:10a6:803:8f::13) X-Microsoft-Original-Message-ID: <097234BB-4849-47BD-94A6-901F3157654D@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2001:7e8:cb71:d400:599:ffb5:fb10:685b] (2001:7e8:cb71:d400:599:ffb5:fb10:685b) by PR3P189CA0011.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.25 via Frontend Transport; Sat, 23 May 2020 01:34:45 +0000 X-Mailer: Apple Mail (2.3445.104.11) X-Microsoft-Original-Message-ID: <097234BB-4849-47BD-94A6-901F3157654D@hotmail.com> X-TMN: [fjV5zPekUktNAWG1mVkp2twLPlvTZmq0RPLaZPIC+HAA4rYIQqGJz1L1K2RlcBZj] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 6cecb2c5-3818-4caf-0eca-08d7feb9799b X-MS-TrafficTypeDiagnostic: DB8EUR06HT003: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PYrPJdviUQtpl7MUJG046G+S4rdUAFRDqaw8A3eyIXIpeXi5eF+0bo6yyaUZnIA/+D33cFd8/OkmYXHwIrcpRAyNAsMD3Z01Kjw7W1QQBczA00TT/3yTtu1b+UA33t8Cv1WBodrqrG1qNWoEgwuHmXs6cPMG8Qmlj8OQ7eQ9ZssoFS7LFPxjFg8/6T6kbnyVQbVVsU0md/lrx9nYbYHpdQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR02MB4703.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: ZYukIfy0XmeU4pEwpCfBAn4iD7idcIbEg3dC096PuhxXROvAU9HiC5IJjCm1R30GAKHHujPEOGPe2WefoI35mZxs9kwumsnjeSbsl7UR8L87pM1fBL9KiKtGsFnBE3mBvV7Yek1Hkgq8YqTZHJqWxh023AoaqQ0P+f0eeFcjPgVdt05E6wOsTuICskO1lV4/YRHtWYuBRGP8MclONeQcPw== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cecb2c5-3818-4caf-0eca-08d7feb9799b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2020 01:34:47.5738 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR06HT003 Subject: Re: [PHP-DEV] [RFC] Amendments to Attributes From: bobwei9@hotmail.com (Bob Weinand) > Am 22.05.2020 um 13:08 schrieb Nikita Popov : >=20 > On Wed, May 20, 2020 at 7:08 PM Benjamin Eberlei > wrote: >=20 >> 2. Rename PhpAttribute to Attribute in global namespace (independent of = the >> namespace RFC) >=20 > As was mentioned in one of the previous discussions, we expect that PHP i= s > going to ship more language-provided attributes in the future. With this > proposal we have the "Attribute" attribute, but I expect we'll at least > have "Deprecated" as well, and probably also something along the lines of > "Jit" or "NoJit". While I'm happy with "Attribute" living in the global > namespace, I don't really think we'd want to introduce "Jit" as a class i= n > the global namespace. The name is simply to generic and does not indicate > that this is part of the attribute system. We'd be forced to go with thin= gs > like DeprecatedAttribute or JitAttribute, which seems rather non-optimal = to > me, as we're just reinventing namespaces to avoid using them... >=20 > As such, I would suggest to introduce a common namespace for all attribut= es > provided by PHP. This means we'd have Attributes\Attribute, > Attributes\Deprecated, Attributes\Jit, Attributes\NoJit etc. (I'm also ok= ay > with the PHP\Attributes\Deprecated variant, but that's a separate questio= n). >=20 > Nikita At that point, don't we just want to be able to generically mark all attrib= ute classes visible as being an Attribute? Also the classical examples like <> do not tell you anyh= ow that they're Attributes, if the class is accessed outside of attribute c= ontext. And I guess, with the logic you proposed, it will likely be named "= ORM\Attribute\Entity" making it even longer. I think it would be good to be able to later on just write <>, = <> etc. without further imports, as they seem to be quite basic functi= onality. I think it should remain possible to write simple code without muc= h namespace awareness. Perhaps we should actually name attribute classes including their << and >>= . Thus "class <> {}" (attribute decl), "new <>()" (custom instant= iation), "$attribute instanceof <>". (and, for a namespaced attribute = "$attribute instanceof MyNamespace\<>") The engine could quite easily support that, it's just a little parser work. That way the whole discussion as to where to put attributes in the namespac= e hierarchy would be quite moot, for PHP itself as well as userland. Bob P.s.: As a caveat, on parameter types, if we expect a value being of an att= ribute class, we'd need to require a qualified name containing at least one= backslash or import-alias there. But that's acceptable I think, it will ju= st happen within some internal attribute processing code.=