Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113277 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99172 invoked from network); 26 Feb 2021 08:22:29 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Feb 2021 08:22:29 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E31611804DD for ; Fri, 26 Feb 2021 00:11:39 -0800 (PST) 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.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from processus.org (ns366368.ip-94-23-14.eu [94.23.14.201]) (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 ; Fri, 26 Feb 2021 00:11:38 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by processus.org (Postfix) with ESMTPA id 5B9555101324; Fri, 26 Feb 2021 08:11:36 +0000 (UTC) To: Nikita Popov , Manuel Canga Cc: Internals References: <177da98a052.c500761c696204.3345368100437568281@manuelcanga.dev> Message-ID: <14a6be95-cf59-44b0-cbb7-6583aa2fde03@processus.org> Date: Fri, 26 Feb 2021 09:11:35 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: processus.org; auth=pass smtp.auth=pierre-php@processus.org smtp.mailfrom=pierre-php@processus.org X-Spamd-Bar: / Subject: Re: [PHP-DEV] [RFC] class_name:namespace From: pierre-php@processus.org (Pierre) Le 25/02/2021 à 21:41, Nikita Popov a écrit : > Could you please share the use case(s) you have in mind for this? > > Regards, > Nikita Hello, I don't have a concrete example in mind right now, it happens I do need this sometime. It's mitigated by the fact I need it in most case when accessing class reflection in order to introspect it and generate code or documentation along or I do need to explode the whole class name to introspect namespace parts. Nevertheless, it still happens that I do magic with class names without using the reflection, one use case that comes to mind is a class name to logical name mapper I've written for converting PHP domain class names to logical PHP-free message names for a bus in an heterogeneous infra based upon a naming convention (using the namespaces as a basis for string replacement). -- Pierre