Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127456 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 lists.php.net (Postfix) with ESMTPS id A932F1A00BC for ; Sun, 25 May 2025 20:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1748204792; bh=84bckCwAl3eRbS/m8Xcf3T4cpSV+G9uwiAAzHFfNurU=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Qj/SJ0bYr4etDdm+OwbW6FzzepG7gbAAyCC8waYeaXx07OiyyoYy2wKBgU4+GwPvk hCA3ROrdbwYEyVo4GVjx8IdfvphuhAL7EPmap9j2wAKBnBHM7U+aOcwSf6pVF3RsRf ojMqve3NTKyqV0/UAt8yvo+j5DJ6u5JVCYj9MYBOy/i005oAwBxpU/HWLIUVSOMEnL DulnTSJ7a1XFtj5k6E2D9OoAJ88KGhqxwiqS2oaZh3erl/9wwTX31c0+0CH6MJVcON L+k1odpzi4xPkK1tH2CgFYDOu9RNDtC817g8jnDox2uwpVAiUM1Kyf4dkGX1hVVLT6 SMTvDotGoSq+Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9F27F180051 for ; Sun, 25 May 2025 20:26:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 25 May 2025 20:26:31 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id 5B2D011400B5 for ; Sun, 25 May 2025 16:28:38 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-10.internal (MEProxy); Sun, 25 May 2025 16:28:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm1; t=1748204918; x=1748291318; bh=y9WfF/SOZvue4+c6mzbWV CVu5GEOYOklUmUEeYTAevI=; b=DDBHVSTlSXDObMM8oK5TofokGT7R6l/RFW9rz Izo0twJHvarO7SAlWkCw0S1rfHwBiYyevS6r8DK6V0Y2P+q38GJlnPvXT9Wtr9VE HPUqBk96Nw+pmimdzNq47H+9F6pyunrjZNAPTALesyFXiY4SBTHV7XCSTirox9ld A29zhw9YH0bE7E1SRdiAVHzWtvozOhtrUNZfNvvv5GHMN/O1K3atsZfhBaYo2sPK HkMSkB83wWHSHgPgyF9RyswdXGgA50jZ0t4aiZwthOedEVQU5CzODsMe9IrjIWF6 u39wiSDabxMpxZXIVBICkAhSDr3H217eq1TxscDNr6gOPNbTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1748204918; x=1748291318; bh=y 9WfF/SOZvue4+c6mzbWVCVu5GEOYOklUmUEeYTAevI=; b=Fbw5oMp9hETHQBpnB qICpB1m2nm0vA1HzYuOoHosa9RBa1Pm8f3KwZ5CHtnKeAAYiiOR+fGlPZ/AQ2BXw aRSucT7ezP0WII80onsyKwGuNPE88Bd8QUJgD72pQkY1s2VGr9+emhrzoRiUHQ+m 4LZs+Kw8z+SnLEwZMSTlkH9E+hrYCeTDf9cIOeymYFSLXZJM7ehQ3KDHd0vKN+QN X2UMXyNruBaf2hT28TxFE+ShSRM3TBvlNYbx2PtcPZ1TlNjIiKsmBpZQem5tNtS7 Ch8Vw9HGzdwvFaqCzmborENqaGwMJ5tK8nsKjciJmCr0yDjVL35wpmZXUuGZIf/A trCYw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgdduheehjeculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefoggffhffvkfgj fhfutgfgsehtjeertdertddtnecuhfhrohhmpedfnfgrrhhrhicuifgrrhhfihgvlhgufd cuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqnecuggftrfgrthhtvghr nhepudegvdelgfeugeehfeejteffudevleethfefgeejffffleegtddtveekgeekudfgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhr hiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsggprhgtphhtthhopedupdhmohguvg epshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhp rdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 20201700060; Sun, 25 May 2025 16:28:38 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: Te4ea9ce7af33d8fb Date: Sun, 25 May 2025 15:28:17 -0500 To: "php internals" Message-ID: In-Reply-To: <79E7FA26-2F5A-470C-B1DF-12CC46A08FE5@rwec.co.uk> References: <9A26F72B-D0EF-414F-B193-BED3CAB26A0B@rwec.co.uk> <9f6a0d6e-27c3-4f77-aed6-e55147442b6f@app.fastmail.com> <673fd2db-b07f-439b-a4f2-e9519108d159@app.fastmail.com> <78641D8B-AF1D-4912-920A-D75A37C32F05@rwec.co.uk> <354cb888-97c4-4f8c-a0da-359d1e63c0f9@rwec.co.uk> <10D95B6E-094B-4EAE-A18A-AF6B795CB352@rwec.co.uk> <2adbff61-5e11-4d39-ab5c-d7950a4550a6@app.fastmail.com> <79E7FA26-2F5A-470C-B1DF-12CC46A08FE5@rwec.co.uk> Subject: Re: [PHP-DEV] Module or Class Visibility, Season 2 Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Sat, May 24, 2025, at 4:18 PM, Rowan Tommins [IMSoP] wrote: >>I assume that it will be up to a dependency resolver (either composer or something else) will need to figure out which direct dependencies to "hoist" up and provide a compatible version between the two packages. > > I see this as the responsibility of each "container": if AlicesCalendar > wants to use an un-sandboxed version of a PSR interface or a framework > component, it declares that to the "host" (e.g. WordPress core). The > PHP engine then knows to leave that interface name without a prefix. > Any other class - whether it's written by Alice or installed by > Composer - exists inside the sandbox, and gets a prefix. > > Importantly, all of this should happen on the *PHP symbol* level > (classes, interfaces, functions); the sandboxing mechanism doesn't need > to know about package managers - just as Docker, Kunernetes, etc, don't > know about APT / Yum / whatever Apine calls it. > > Rowan Tommins > [IMSoP] This is where I'm not clear. Why wouldn't it need a concept of package/module/thing? Even if we develop some way such that in Foo.php, loading the class \Beep\Boop\Narf pulls from /beep/boop/v1/Narf.php and loading it from Bar.php pulls the same class from /beep/boop/v2/Narf.php, and does something or other to keep the symbols separate... Narf itself is going to load \Beep\Boop\Poink at some point. So which one does it get? Or rather, there's now two Narfs. How do they know that the v1 version of Narf should get the v1 version of Poink and the v2 version should get the v2 version. If there was a package/module/cluster/thing concept, then it would be easy enough (at least in concept) to extend whatever translation logic exists to the rest of that package/module/cluster/thing. Without that, however, I don't know how that transitive class usage would be addressed. --Larry Garfield