Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124195 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 CD15D1A009C for ; Wed, 3 Jul 2024 13:07:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720012147; bh=wN5sT4EbZZOSB0UMpXe3yWf6rQOjTp209VHWjkXh/jU=; h=References:In-Reply-To:From:Date:Subject:To:From; b=AZvSUIGFSP2KjiQFQ4tqhgk0iYan6fOAesWtY/Ce+AoUOtLRWTD9eIn/XLtqxaxAu 56ZOoo7DB472Sr2nfkcQuLmbm79NlI2sPFUiAotQIK6QYn+ZSd2cdVyxSjuPtIOqhx 9UZqMc8zUoSJ2UWhppXen938RrDZkC0DpyVFwzuXFqmsEaFDV9qnmeL1ToymKdlpd0 5xUZC1TvuwZX2u7odWZnSIal8RssRqCQpAkyhbYxCEtzacJAvJoPSIbdztoz7c/wfI frYRXS98xt30crXQl7GB/vdnmISDfMxveRWeD1dDTP/OM2uqjpp3ooyFFbGG/kbSv/ 1AWIWGieQvEHA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8074D180E26 for ; Wed, 3 Jul 2024 13:09:06 +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,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, 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-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (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 ; Wed, 3 Jul 2024 13:09:05 +0000 (UTC) Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-79c054b65d4so340141385a.1 for ; Wed, 03 Jul 2024 06:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720012063; x=1720616863; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=xvkzOv8QlNHwxiVJJ+iknBLaLrnbrNT88j1hxBHkaW4=; b=Am1ign4KEGrRYr2pGe/dmqxhcFbid+qypJ5DGbX5pYpA89F0oUk1Z3f2M2UylQE0rT XNohzwjdh2XjRMeJe1ng+gF+sugRTS2xwpqU2CDfoWlzS40JvLXBki1k+Hm0h4KTnps5 GOCstdclPhq8YQ3D/GguAJqDxm39zXMh3bdza3k0EmPDbzAjOKjSa7+U+xKkjOp80cNU cNBbhtNvI833seGccjL2yvWG/3a1TW6swuPn4zvP5tZyUngAHbfadoX+9CZ+VEocR06y CBOicDsviwFys1lRyI1OeiFBZD7ZDgNOXMNySZlFOjwXUdJgI2+84BPYMPM4Vekt+Hs3 5Usg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720012063; x=1720616863; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xvkzOv8QlNHwxiVJJ+iknBLaLrnbrNT88j1hxBHkaW4=; b=vxiD6UJpiJDlgr1zH7YkL7f3WAS/zGM0Nc6jlmTNHh9CSw54SvVIkF/skrpDIg3/bP WMSayiborBX/1hJGFBegaMmc9C3Ee9+4gr15HkOj/SLkf2w/nldCfU41uYsGJy8Sq/tF r25R30lqV0UgoHmdS5jnFcaUUVyhXJih2QRuC7QyV7iN23YErMnxttW1rSsQp+FJ87Mk vFdRZaDd1qdwqPX+493MB934yjIRcp9UVwLbEDjCUYQFGukIHl4DTy43vznU8QNEb9An 15P3uB0+H6dsKV6OOmTWyh0hfnlpejbp8o0TIyCSiT5OHrfJXqZYqM6oM0A6uUM12N7J QqBg== X-Gm-Message-State: AOJu0Yywf2Ei+Kf1KeBDiIxvnHRQPOigDhu1eOgcaFqp/sMv9TvIxds0 OcY2omqpKrTUo6yumfGgIshHQ9BQA+rUdcORqKttcwdFzNRO3eO9EXy4Q0Rf+sR9nWR1/LIEh5A zc2nT0hEmIFRBUF65vo1dlIXDb0Ko7nYU X-Google-Smtp-Source: AGHT+IHmLcrD0yd7kPHurEd/LBzADs3KrNNEuX1mwLvjf0waq6+6bUXgzh2THMSY/sA3o6zyqMgx7YJS0pPETm3EzX0= X-Received: by 2002:a05:6214:ca5:b0:6b5:8934:7179 with SMTP id 6a1803df08f44-6b5b71c4d93mr154854956d6.58.1720012063287; Wed, 03 Jul 2024 06:07:43 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <1917CF7C-26D8-4DBE-B05C-5AA650AC6C9F@rwec.co.uk> <551cd5b0-1c00-4818-a9ca-97f6b7e8c3dc@app.fastmail.com> <39B496F8-062E-4848-9B3B-529BE8D3415A@newclarity.net> <856F4F70-DC81-4098-82DD-5F6D47CDF3F0@newclarity.net> In-Reply-To: Date: Wed, 3 Jul 2024 09:07:32 -0400 Message-ID: Subject: Re: [PHP-DEV] Packages Iteration 3: was Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript To: PHP internals Content-Type: multipart/alternative; boundary="0000000000000ab0c8061c578414" From: tendoaki@gmail.com (Michael Morris) --0000000000000ab0c8061c578414 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 1, 2024 at 1:33=E2=80=AFAM Micha=C5=82 Marcin Brzuchalski < michal.brzuchalski@gmail.com> wrote: > Hi Michael, > > pon., 1 lip 2024 o 01:18 Michael Morris napisa=C5=82= (a): > >> ... >> Applications >> >> The application is the root package. It is the package that imports to >> the root namespace. When PHP is asked to parse a file it will look for a >> `.php-packages` folder, first in the current working directory then in >> parent directories. If it doesn't find one, business as usual. If we d= o >> find one we follow its directives about setting up an application >> environment. >> >> The `.php-packages` folder is where PHP will put package related code fo= r >> the application at hand. Code written explicitly for these changes will >> also put their package related files there - composer's vendor directory= , >> composer.json, composer.lock, and so on - rather than putting those file= s >> in the site root. The folder is hidden to prevent web servers like nginx= or >> apache from serving the files directly in any way. >> > > First, you use the term Application then Site - decide. > Not all PHP applications are HTTP Applications, consider consumers, cron > tasks other daemons, these don't need the existence of either Nginx or > Apache. > Not all PHP HTTP Applications expose files to Nginx or Apache - most of > these I know like Rest API give ZERO access to any application file to > Nginx or Apache. > > >> The .php-packages directory will have a configuration file called >> `php.mod`. This tells the parser: >> > > You propose to move `composer.json`, `composer.lock`, and `vendor` into a > hidden folder with no good reason which simply adds more confusion. > > >> Let's look at what such a file might look like for Drupal. For the momen= t >> I'm going to use go.mod's syntax. The final syntax to be used, be it ini= , >> yaml, toml, json, is a discussion for another time. The part to focus in= on >> here is what type of information do we need. >> >> package Drupal >> >> php 10 >> >> registry //packagist.org/packages composer >> >> init ( >> composer install >> ) >> >> require ( >> ./vendor/autoload.php >> ) >> >> imports ( >> //getcomposer.org/composer.phar >> ) >> > > This looks like a completely new file format which simply makes > interoperability harder, > When you read my messages, I'll read yours. The fact that you blasted over my statement of "The final syntax to be used is a discussion for another time" betrays your intent - to torpedo this discussion and add nothing valuable to it. --0000000000000ab0c8061c578414 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jul 1, 2024 at 1:33=E2=80=AFA= M Micha=C5=82 Marcin Brzuchalski <michal.brzuchalski@gmail.com> wrote:
Hi = Michael,

pon., 1 lip 2024 o 01:18=C2=A0Michael Morris <tendoaki@gmail.com> napisa=C5= =82(a):
...
Applications

The application is the root package. It= is the package that imports to the root namespace. When PHP is asked to pa= rse a file it will look for a `.php-packages` folder, first in the current = working directory then in parent directories.=C2=A0 If it doesn't find = one, business as usual.=C2=A0 If we do find one we follow its directives ab= out setting up an application environment.

The `.php-packages` folde= r is where PHP will put package related code for the application at hand.= =C2=A0 Code written explicitly for these changes will also put their packag= e related files there - composer's vendor directory, composer.json, com= poser.lock, and so on - rather than putting those files in the site root. T= he folder is hidden to prevent web servers like nginx or apache from servin= g the files directly in any way.

= First, you use the term Application=C2=A0then Site - decide.
Not = all PHP applications are HTTP Applications, consider consumers, cron tasks = other daemons, these don't need the existence of either Nginx or Apache= .
Not all PHP HTTP Applications expose files to Nginx or Apache -= most of these I know like Rest API give ZERO access to any application fil= e to Nginx or Apache.
=C2=A0
The .php-packages directory will have a= configuration file called `php.mod`.=C2=A0 This tells the parser:

You propose to move `composer.json`, `com= poser.lock`, and `vendor` into a hidden folder with no good reason which si= mply adds more confusion.
=C2=A0
Let's look at what such a file = might look like for Drupal. For the moment I'm going to use go.mod'= s syntax. The final syntax to be used, be it ini, yaml, toml, json, is a di= scussion for another time. The part to focus in on here is what type of inf= ormation do we need.

=C2=A0 package Drupal<= br>
=C2=A0 php 10

=C2=A0 registry //packagist.org/packages composer

= =C2=A0 init (
=C2=A0 =C2=A0 composer install
=C2=A0 )

=C2=A0 r= equire (
=C2=A0 =C2=A0 ./vendor/autoload.php
=C2=A0 )

=C2=A0 i= mports (
=C2=A0 =C2=A0 //getcomposer.org/composer.phar
=C2=A0 )

This looks like a completely new fi= le format which simply makes interoperability harder,=C2=A0
=

When you read my messages, I'll = read yours. The fact that you blasted over my statement of "The final = syntax to be used is a discussion for another time" betrays your inten= t - to torpedo this discussion and add nothing valuable to it.
<= /div> --0000000000000ab0c8061c578414--