Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121035 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88177 invoked from network); 11 Sep 2023 01:59:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Sep 2023 01:59:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 428BA180506 for ; Sun, 10 Sep 2023 18:59:34 -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.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_SOFTFAIL,STOX_BOUND_090909_B,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS36483 23.83.208.0/21 X-Spam-Virus: No X-Envelope-From: Received: from dormouse.elm.relay.mailchannels.net (dormouse.elm.relay.mailchannels.net [23.83.212.50]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 10 Sep 2023 18:59:33 -0700 (PDT) X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4B996800E3C for ; Mon, 11 Sep 2023 01:59:32 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 8DBB6800A05 for ; Mon, 11 Sep 2023 01:59:30 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1694397571; a=rsa-sha256; cv=none; b=3PdfS98XNzsXXk3OiQ2mJUbbRkEmQ2FciKjw7tlmDcn4YvqfPvtuArYCyY8MI6J8Hi5ZMe KPxwbSnx8EFmCM+hnwAKtKYn8k82Ta/mWnuSnBboe3gyaBVYaJ8Uc3vfUNlRITzVR3tStu mkEWVEEk9y6Lj/upRlEUC79ADhhvipUELOcRHmmt44ZtbnsiNzWcYxTDq90jcf6ABI6JO2 qn18x6Wz5L/16Jeq2y+E+7LkJUFrH8DtehJZCc7DXdjOnkzXKI4MIoPazHJNdUc0DS2enB uUtQDS/N2BMQcthTQmU2iYwAfp57KBFXvSGtssmMlJGhcjuuq93APbmfH1O3fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1694397571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2LS3SVlO/WfJ40TH8E+TGyU/RPCDCBvONyOxpUNv2ZY=; b=6BV3SVKM/dOid9XTh5XsBjv03Yjz3jp44SzuFYlndCXaJ/llTQibBcqEIgpFDSiD4tf1eI thc+4xuc5Yf0/tcNAa58FtnxZWGsEUWdPyn4lWr4u6MvbcwPSRMke801cu8BPbZNHEFIJF QLp1KqLz7BADaERnKXZ2HSq8MBiEWvU2+pa4W3Z/SMzWOhq++8c+pRQshHFGej25YKNCG8 FS4FqOE0HReO1IYVWh2bYjTRkpm/N61KLhfvnNNrPsUVHudwc3xP1LY3xjRdLb0mB0eiab 7vm/9y0szRtp9vkGi/wQGMUxvLP3V12CbvwY2Y9XMf3F8ZJ84E1zrkpstqMdFA== ARC-Authentication-Results: i=1; rspamd-7c449d4847-hksxk; auth=pass smtp.auth=a2hosting smtp.mailfrom=php-internals_nospam@adviesenzo.nl X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|juliette@adviesenzo.nl X-MailChannels-Auth-Id: a2hosting X-Cold-Squirrel: 34777d06583a2279_1694397571284_1746214248 X-MC-Loop-Signature: 1694397571284:1326498055 X-MC-Ingress-Time: 1694397571284 Received: from nl1-ss105.a2hosting.com (nl1-ss105.a2hosting.com [85.187.142.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.116.67.116 (trex/6.9.1); Mon, 11 Sep 2023 01:59:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=adviesenzo.nl; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2LS3SVlO/WfJ40TH8E+TGyU/RPCDCBvONyOxpUNv2ZY=; b=OIpJWnnbT4fqiV2IOiIV3K3XFF Aozu0jmOjqT8c5GcyZgSb/lP9N6Cw04ci/3DWx7I4sDgpirPIs+DPZlMEe1FwaaqsSUk8znyPvwRI qCV7/vtVnvoBR1CuJs7kTAZgUmOHIkm+94SsYeM0iBZpqoYlJabdBvoejv68R+RrBwhg=; Received: from [143.178.154.86] (port=62175 helo=[192.168.1.16]) by nl1-ss105.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1qfWD3-0020NG-0Y for internals@lists.php.net; Mon, 11 Sep 2023 03:59:28 +0200 To: internals@lists.php.net References: <01e3ff17-5088-0431-6014-82ef4e4789b2@bastelstu.be> <48699eff-c0d1-43de-b68e-2327fa601528@gmail.com> Message-ID: <64FE7480.6040505@adviesenzo.nl> Date: Mon, 11 Sep 2023 03:59:28 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <48699eff-c0d1-43de-b68e-2327fa601528@gmail.com> Content-Type: multipart/alternative; boundary="------------030305000303090304080008" X-AuthUser: juliette@adviesenzo.nl Subject: Re: [PHP-DEV] Casing of acronyms in class and method names From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) --------------030305000303090304080008 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 11-9-2023 1:57, Ben Ramsey wrote: > I agree. Using uppercase for the first letter in an acronym and > lowercase for subsequent letters appears to be prevalent in many > userland libraries, so it seems to be what users expect. > > Since class names in PHP aren't case-sensitive, there should be no BC > concerns for changing existing classes to fit this new casing (for > Reflection, debug, and documentation purposes). That is, if we wanted > to also update all existing class names in PHP that contain acronyms > (e.g., DOMDocument -> DomDocument, SimpleXMLElement -> > SimpleXmlElement, etc.). > This prevalence may stem from various CS checks enforcing/suggesting the naming like that based on their implementation/interpretation of CamelCaps name checks, often related to PSR4. Along the same lines, I'm aware of CS-like tools enforcing the use of PHP native class names to be in the case as defined in PHP (mostly to prevent confusion when people search for more info on the class and such, even though it doesn't matter for the actual use). With the above in mind, I wonder how much confusion/code churn renaming existing classes will cause and if that's worth it, especially as the suggested case for the PHP native class will likely be determined by the version on which the tooling is being run. I.e. tool being run on PHP 8.2 suggest DOMDocument, tool being run on PHP 8.4 would flag DOMDocument and suggest DomDocument... Smile, Juliette --------------030305000303090304080008--