Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124219 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 AFFA61A009F for ; Thu, 4 Jul 2024 15:06:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720105652; bh=rijFCCamH04smYpQImIictjv7k880panEzSbBYLCK98=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=cDV6pcFKwlMk+smE7QNElBeGEm/lpAUHffJLPCDKvxoZoVabXOC1TOuo2cp+PFU6E ZaubiiegmlSXDJlaITlS1YoHdBMH7tGd7w6BQnJ+Au1nis3sn9rPPKzAfYOAtspx3n JlR6wt5iNHxqGb5G4GWVgIENa9AbTGRfV9+JqeLZ0x0tBeY0UfOR6R7fZ4LRXnvyyK eBb44mUiyD1kOJFn4tfU45sTsize2Zz4a727vvpRvlctR/7aENh8dVLSw8MN2yLvxO djveGlszOkR4vksfNV7m9CB0SvrG6XxKX3Tx4dC1QfVDWf/INjG1OMvb5rQ5djNbTW v89WTyP0dVhgg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 972C3180D47 for ; Thu, 4 Jul 2024 15:07:29 +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_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) (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 ; Thu, 4 Jul 2024 15:07:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chaz.works; s=protonmail2; t=1720105562; x=1720364762; bh=+Pk8xPKckJ+y/eR0u8I+vfR5Fgh9HFukh/waSzqBml8=; 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=NYNq44gBBrkwGawgpZ6f3IiuL5Po6K38bMPLZVgpKwpNGcdVU0Vs+tG3mDUIiWo++ ao1+UKBgJjv9McJSNfu8+RG9/+Q3kjnAFReBPyoyYS28aGq5smuPg5om8CjH0Y2Kcw weLQxi0J6vdpK9+M0kQgijOzzd6OtwTbaP3zeZKCOihxUYxeevmMHqux0FQvkk+tcJ sOzRoivPBoKMI0lKPD/4KU6sxLcnb5I8mllbn1YfNTF6ovA3/1VsVSzr1r2rAcbxfz F38vWu95S5ad45tG6NKaz/VQ9oyZDX0KvOanubhHjGT8rF01dPblQFwuKbEXiK/33z kXjfWLRdPZHWw== Date: Thu, 04 Jul 2024 15:05:58 +0000 To: Michael Morris Cc: PHP internals Subject: Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV) Message-ID: In-Reply-To: References: <09559430-4477-4516-8D78-6F4071E1AA6C@newclarity.net> <0182F3D6-F464-477F-9029-A2D0A8B50C71@koalephant.com> <1AFD7AAE-8BEA-460D-88A8-15BB3D30A775@koalephant.com> Feedback-ID: 95748689:user:proton X-Pm-Message-ID: 31452854aea0e3216c73edecdf2c6febe05b596c Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: chaz@chaz.works (Chuck Adams) > On Jul 3, 2024, at 6:16=E2=80=AFPM, Michael Morris w= rote: >=20 > Hello all. Hitting reset again as the primary problem at hand has become = clear. Let's recap it. >=20 > Autoloading is great for loading packages, but it can't load different ve= rsions of the same package at the same time. Why would you want to do that= ? >=20 > When you don't have full control of the code. >=20 > For example, consider Drupal. It is running Twig at some version of 3 at= the moment. Suppose Twig 4 is introduced with significant backward compati= bility breaks (Not saying the authors would do such a thing) but also wonde= rful features. > =E2=80=A6[snip]... > This is why I advocate a new keyword for this - import. Import=E2=80= =99s behavior is most similar to require_once, but it doesn't have to be th= e same. Since it is a new entrypoint into the engine the way the engine co= nsiders the code can be different - whether slightly different or radically= different is a debate for another time. I'm going to stick with only those= changes that make sense in the context of package links. I=E2=80=99m seeing a lot of conflation of =E2=80=98module=E2=80=99 and = =E2=80=98package=E2=80=99 in these discussions, and to me they mean differe= nt things: * A module is a sort of =E2=80=9Cfirst class namespace=E2=80=9D that can ex= port symbols and import others. Think ES5 or python modules. If you don= =E2=80=99t want it 1-1 with files, think Perl modules. * A package is an =E2=80=9Cinstallable=E2=80=9D unit that provides modules,= among other things. Packages have metadata, the most important piece of w= hich is a machine-readable version. Certainly there=E2=80=99s overlap between the two, but the first is a more = low-level thing that doesn=E2=80=99t need worry itself about versioning let= alone multiple simultaneous versions. I just don=E2=80=99t want to see th= e possibility of having basic =E2=80=9Cimport=E2=80=9D and =E2=80=9Cexport= =E2=80=9D functionality crushed under the bikeshed while all the fine seman= tics of versioning are worked out. =20 =E2=80=94c