Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109927 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17965 invoked from network); 29 Apr 2020 16:04:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Apr 2020 16:04:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 673BE1804E2 for ; Wed, 29 Apr 2020 07:38:07 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 29 Apr 2020 07:38:06 -0700 (PDT) Received: by mail-wm1-f47.google.com with SMTP id v8so5108886wma.0 for ; Wed, 29 Apr 2020 07:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=UMwhW7fkzYW++qiuUrovVeCmQRbq7G6LXbMvBIatrG4=; b=MIPqMp1MuYjWqMOIZrOc63zwZNPufq4toWQzzjVFtabGOheuXgVJuz646s2xDBA9n6 UCqhPQr2FPnY4z1Xxz4LPBfO1kxB+ElysJ6ZkFC1lvubdtg+jrLIii2BqlAyB0Bvpkj3 Tgp/IOdgn55HhP4GXaR04jqFf7C1DMC53hg2dMtfRIisrWwsmaOkeNe9Z2JToSbzDra0 10y/rzsXTSGwwJE2LJpjHgjJeLkQwntqHHgXAwWS84rwf8HiUhj5lXfInHhZNjLtmeya 9dZbwjaZuPTD8MnL7U6dty1nSN08QaBnTHi6KvX8T0DcxG3SalEKPHBpKPjBMlp0aNdG dWcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=UMwhW7fkzYW++qiuUrovVeCmQRbq7G6LXbMvBIatrG4=; b=Y/hKPVVeQdB3zf8sHlP5k7ENWnQWc2nvUc6avCMW2linVz9S2FjEtDFVRM2gqAJgb8 RHsHBRoJXBYtGSF5N2xEI0JHg8PjtwBGrm8L4a6lsF+q7ke9VRJymRv6RjgEnT3PWuUs 1X82kESJblCfB5i3AZ53X0JwKy3RkJycky6q2lfdJ3KmhHIePCZK/z+kDfqyG4pHZFxf hy7N74yI24SrBA3mz5dNvFNNQcr81hxFpSNuyiNyIcfbkLiisNhvSneDYov8g7lfnrg+ uk8y8YDvhG65P9QJgRdNsDvWuYr43Z4MnBiXOVKl7NZ3vEKLbPoFPqy+R2cLGQOwuche U8GQ== X-Gm-Message-State: AGi0Pub5hk0+T67D1u1WGPuAcJOQp2VomlK7essn5DzU5C8D7DyO7yLX 0W6Hwh0s7jmKuXgZ7BkcZMgQhBPV X-Google-Smtp-Source: APiQypK2YYwqvXD7v2JiFOmEHO5GU9L2oTIHGuGrnqthBJbzK6qmqN9HCSvxN7OIygTBnCnc7m00HQ== X-Received: by 2002:a1c:9d0d:: with SMTP id g13mr3804270wme.102.1588171085367; Wed, 29 Apr 2020 07:38:05 -0700 (PDT) Received: from [192.168.0.14] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.googlemail.com with ESMTPSA id b191sm9019126wmd.39.2020.04.29.07.38.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 07:38:04 -0700 (PDT) To: internals@lists.php.net References: <4063585.LhOdPkFbeG@mcmic-probook> Message-ID: <2bac53b8-ad92-7632-7119-500291b00345@gmail.com> Date: Wed, 29 Apr 2020 15:38:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <4063585.LhOdPkFbeG@mcmic-probook> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] Renaming PhpAttribute to Attribute From: rowan.collins@gmail.com (Rowan Tommins) On 29/04/2020 13:50, Côme Chilliet wrote: > Le mardi 28 avril 2020, 18:59:22 CEST Benas IML a écrit : >> Could you provide any examples as to where '\Attribute' is being used in the >> wild? I haven't seen a single project that has an Attribute class and uses the >> global namespace. > We do use an Attribute class in FusionDirectory: https://gitlab.fusiondirectory.org/fusiondirectory/fd/-/blob/1.4-dev/include/simpleplugin/class_Attribute.inc Thanks. I clicked through a few results on GitHub (most of which were incorrect matches) and all 220 results from this search (nearly all of which were in a namespace, so unaffected): https://grep.app/search?q=class%20Attribute&case=true&words=true&filter[lang][0]=PHP That yielded these further examples: * https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikiLexicalData/+/master/OmegaWiki/Attribute.php * https://github.com/opensourcepos/opensourcepos/blob/master/application/models/Attribute.php * https://github.com/yupe/yupe/blob/master/protected/modules/store/models/Attribute.php * https://github.com/leenooks/phpLDAPadmin/blob/master/lib/Attribute.php * https://github.com/swipestripe/silverstripe-swipestripe/blob/master/code/product/Attribute.php * https://github.com/Nerdmind/Blog/blob/master/core/namespace/Attribute.php * https://github.com/MISP/MISP/blob/2.4/app/Model/Attribute.php FWIW, most of these seem to be one-to-one mappings from a database table name to a data object. There's also some hints that PrestaShop has a class name that would be affected; the actual file shipped is called "AttributeCore" (https://github.com/PrestaShop/PrestaShop/blob/develop/classes/Attribute.php), but there's some magic in the autoloader which may explain some of the references I'm seeing (https://github.com/PrestaShop/PrestaShop/blob/develop/classes/PrestaShopAutoload.php). > I’d expect a lot of projects to have an Attribute class, since there are things named attributes in lots of contexts. The reason I wouldn't expect it to be that common is precisely because it's such a generic term, so projects might well avoid it as a) too vague; and b) too likely to conflict across the application. It's certainly going to affect some people, but I'm not convinced it's more likely to conflict than any of the dozens of previous classes that have been added to core over the years. I imagine claiming it in the root namespace will have a similar impact to claiming "Error" in PHP 7.0, which I don't remember a big debate about that at the time. Regards, -- Rowan Tommins (né Collins) [IMSoP]