Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125712 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 qa.php.net (Postfix) with ESMTPS id 266651A00BD for ; Tue, 1 Oct 2024 16:36:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1727800714; bh=37Z19TYAWi+53RgMtSH5BxSoaJtu7RnFGd0Lc026p6M=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=S40jhGx5i2XRc2pgs01qHocqF6ywgZU551P4dtirOMgeK6E7UQm9nbke/c+qzxgot YC9iMVa3sfQo8r8eL8r8uldkXmH3lwazWGkU8Gf3bDNe1Ujm6CjLxAyM1KlWQ1APFO Ea0yGpvR7A4yrAsw6SMb+ba2WnAqKB0QhSDww2QKLINz0VFD1sQ443xbIggel9Fe3Z Rh7ZD13vZjE+P2jgA8Q4C6Q8BSgZrAwY2Vn0cH4oV9j0/qM4lXX58a1Acba3/nBR2u +DYzp7X1jTV0+aICQ2IcfuJsXQlm2nUm6XMdLvD4IVdlDcU1J7Lonv3GHsyavFKMiN ogBTTpAck3NHA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DEA4D180041 for ; Tue, 1 Oct 2024 16:38:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-4018.proton.ch (mail-4018.proton.ch [185.70.40.18]) (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 ; Tue, 1 Oct 2024 16:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail2; t=1727800576; x=1728059776; bh=37Z19TYAWi+53RgMtSH5BxSoaJtu7RnFGd0Lc026p6M=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=P6smWiNN80K9wQjUNI/SZ+oYQFtrf9ywvkMSc+BSG8NISEWqi4KBTuqvDER2IIf7a f4vFi6LDsR/RXhEsX6S1kftLiuvW4jn+hVtQjqxkJPF6CavW8P7Jfbm/LHioN04QJF 8AA8A1xNWIfiX8AqwVOnuQNBLY624Woblz7/cZQmvq6MEGQXwOg8iMR7+8tCrc5vRM GBslGDTXyilB/QV6iRgrOJtL5BEzIFOiogSDcNjhrfVXseqTfXAgch4e5X/h8tKhk7 f8LL/TAb5CV2j11FhCn3IdJd3PGTE8LwcR/0SyuL8lvybQDfn+ugdq6wo9thEfhxlh Z8IIROjFTC6Zw== Date: Tue, 01 Oct 2024 16:36:12 +0000 To: Nick Lockheart Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Change Directory class to behave like an opaque object Message-ID: In-Reply-To: <3ab9db77462c5f49c7c4a977098ba4677deb363f.camel@ageofdream.com> References: <2VnM6xycBpzqzDnAZKWS4zxCSUjvoKywJRiBzTcGhS8axaFS7QwbGNQtjkovo1jQi1XLiEGGTi3KfQfWoxUT527U_-6IGO3092BZdW436q0=@gpb.moe> <3ab9db77462c5f49c7c4a977098ba4677deb363f.camel@ageofdream.com> Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 9863f9823c6ea68226132470488a2195c2313cf5 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Wednesday, 25 September 2024 at 10:12, Nick Lockheart wrote: > On Sat, 2024-09-14 at 15:33 +0000, Gina P. Banyard wrote: > I don't suppose we could call the Directory class something else, like > "SPLDirectory"? >=20 > You can't make a Directory with `new` (or at least you aren't supposed > to be able to), so any existing code would already get a Directory > object with `dir()` not `new Directory()`. There would be no BC break > with a rename. This is factually incorrect. This would be a large BC break, moreover PHP "owns" the global namespace. If you are in a namespace and attempting to instantiate a class named Directory you will either get the namespace version of the class, or an Error as there is no fallback to the global namespace for classes. Otherwise, if you are in the global namespace and try to create a class which is called Directory this would result in an Error being thrown. Finally, people may have typed properties, or parameters with the type Directory, renaming this would break all that code. Best regards, Gina P. Banyard