Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127551 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 91C8C1A00BC for ; Tue, 3 Jun 2025 06:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1748933020; bh=qbV6O7AjRwR4RtdCHmtQPt4JrY3cpgAghROmGVKSF5c=; h=Date:From:To:Subject:In-Reply-To:References:From; b=FrMY4fAbII6BYT3G61QrGetbcvx6MC0jn8fWnueuePrICTujTL4jt5HwqeiBjCcXE oX8PaRNDh0g0p6aoPrhOlgOO4djJ77Dd5m0Umz4rnJR/hhFcgbiZVFI4Fw4nVo0I2H ONV7MljFbA6RHDl1UC6CycsE2MVwdNsaFb5WUu52EH48RnWINXBBgGL0d1fh4uhvhO 2zInuzfYSPp8BLoj4QNFaQsHOfVp5PXKsxOmlKTyHqzROXzPe2u01tzEwIzWHsUs5Y IJguaJZ4upjooUZxJE8huD1FTZNdnLNmrj2Oz58+0V3U2p9OHkpXqEW1miw5Kox5do s8DDXsq6RX8nA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 18E5518002F for ; Tue, 3 Jun 2025 06:43:39 +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=-1.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS 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 fout-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) (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, 3 Jun 2025 06:43:38 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 8B2E61380389 for ; Tue, 3 Jun 2025 02:45:42 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 03 Jun 2025 02:45:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; 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=1748933142; x=1749019542; bh=qbV6O7AjRwR4RtdCHmtQPt4JrY3cpgAghROmGVKSF5c=; b= LiF3bLMWGFXmhTo64Js2yCqpOemHdhlBlV3TBuDUN84G8fDPEZQXn1VhLsxPqEW9 J/Nkp0qTh0uwf3CLGwDr6IXhUvRn2Vp0mOwFlBzlfx1Qi26KSi0mYqN6JcmxQAhZ c2/7Dl4ouu2QgI9aCINUKMOt8xQmTq2Zufh3A8N6rI5mok4JDAKmlTqGYdj1dG8W 6S+NZA1iAynO6Uir5Oarb9M5qK3KxY9GXezPwoM21EH4cE+AO33GUBhILhUen+4s tW0H9JCd57eElMloURxcouAHvIZQjIU010Mpevu8PTAhniF/ipUAKvHpIsiHFP2j Zwya8vgm3KdrlXnBrxfgyw== 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=1748933142; x=1749019542; bh=q bV6O7AjRwR4RtdCHmtQPt4JrY3cpgAghROmGVKSF5c=; b=LrXghYUTGENE3/JBc p6bYh/bfywLQ5p4cEDq2IrHAaTOUUSWJhk6u/1/F3DcBoYIQ1HikqlinSQcMxH/n fwYC1Oi1TWzpfbkImDvcxkK/zVYV8quxRTWm76GwsqSjWRtKdygBLrbppWnsPQ7L 9/1P6Elaml47mtgTzY2dtty8hRumutC2YtX/mTAbnlFcJoBaONMwA09MDTxJVmxC QP31gOwoqX3MzG27R3iqCD4EfuQFWD8wmKFabRXVMg8A/WGCJhleQQmHba2vb3mV 5gLwfXWmOPC5xBhxtCmQBSomf7v06i65f+LQ9qsHdbsrO3O8+vn7W1ErQnzsSvLs ibl8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgdefleekieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhepfffhvffufggjfhfkgggtgfesthhqmhdttderjeenucfhrhhomhep fdftohifrghnucfvohhmmhhinhhsucglkffoufhorfgnfdcuoehimhhsohhprdhphhhpse hrfigvtgdrtghordhukheqnecuggftrfgrthhtvghrnhepheelffetiefgveduteefudeg tdduveeludegueegleehiefhhefgtdekveevgfelnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepihhmshhophdrphhhphesrhifvggtrdgtohdr uhhkpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhope hinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 3 Jun 2025 02:45:41 -0400 (EDT) Date: Tue, 03 Jun 2025 07:45:40 +0100 To: internals@lists.php.net Subject: Re: [PHP-DEV] Module or Class Visibility, Season 2 User-Agent: K-9 Mail for Android In-Reply-To: References: <79E7FA26-2F5A-470C-B1DF-12CC46A08FE5@rwec.co.uk> <1c6dcd84-9016-48e1-971f-de7749cbdce8@rwec.co.uk> <44F59416-3922-4AF4-881A-C64F2C4E9345@rwec.co.uk> <7F11844A-A98C-4843-BC94-815FBCD2B73F@garsi.de> <7840468C-F60C-4A44-AE40-16F9007EF428@rwec.co.uk> <160E9B1D-9AF6-479B-A628-A73C618D7C1B@garsi.de> <2c5c241c-bd05-4200-b6ee-e94c8ab0db1b@rwec.co.uk> <894DC5D3-3CDD-479F-BAC1-70EE1AE0C5E2@rwec.co.uk> <5eb5b1b4-7cb2-4a2b-afdd-ad3e83ae856d@app.fastmail.com> <57d08124-fb6a-4e0b-8d42-bdb645571b13@rwec.co.uk> Message-ID: <89AEF40A-562B-491F-B642-9B9EA8E1E8ED@rwec.co.uk> 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: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 3 June 2025 03:38:58 BST, Larry Garfield wro= te: >I fundamentally do not believe pulling arbitrary files into such a struct= ure is wise, possible, or will achieve anything resembling the desired resu= lt, because *basically no application or library is single-file anymore*=2E= =20 I don't think anybody, in any of the examples on this thread, has ever sug= gested listing individual files to be loaded into the container/module/what= ever=2E=20 The suggestions I can think of have been:=20 - track things recursively, e=2Eg=2E if A=2Ephp is in the container, and l= oads B=2Ephp, put B=2Ephp in the container - choose based on directory, e=2Eg=2E whenever the file path being loaded = begins "/var/www/plugins/foo", put it in the container (this seems by far t= he simplest to me) - choose based on being in a Phar archive, i=2Ee=2E whenever the file path= being loaded begins "phar:/var/www/plugins/foo=2Ephar:" (this seems entire= ly equivalent to the previous point to me)=20 Perhaps what you're picturing is that the compiler needs to know up front = what classes do and don't exist, so want to create some kind of index? That= 's not how I picture it=2E If code in the container references a class that= doesn't exist, it should call any autoloaders registered *inside* the cont= ainer, and if they fail to define the class, it should error as normal=2E There needs to be some way to "import" and "export" symbols to communicate= between the container and its host application, but I think for *those* it= is safe to list individual items, because you're not trying to pull their = dependencies, just point to the right piece of code=2E Rowan Tommins [IMSoP]