Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124200 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 267681A009C for ; Wed, 3 Jul 2024 14:47:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720018148; bh=CAD0c4qvu0vkFBgYnnVey5bCOM/0EoyjFKyqEJ9mppc=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=J+nM0p3C/4C31WvOoyjRTyV4eQ38edEtp4Sjx86lutroVTgR8jVjxRHTB6zJaUJg1 mHrkPtoO2caSe+erZvelpR+uVlypDFsfoYjN3lj8tLlYpWOtiQTbFtbFbZauVLI7ZP HuAnszvgnsnE+9jgK9dZ78bdLruh3ofzMPpu0/IFc8xdBd7ONBmLKMs9zYfTjeD656 Q5lteYPSxdTcFI3cAtymyilOvN8b+7xTQ+rXRAJt3RC6QTF2yCUYEE7/M5IpzFWDiG y3HfKO7s/gYNVZ3FLyctLBvDlbjQElg2ETMac/Zz4MCk/B0oINgcfa8tOilRI7F4xe xemhUG2xrghJA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3756B180AB4 for ; Wed, 3 Jul 2024 14:49:07 +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.8 required=5.0 tests=BAYES_50,DMARC_MISSING, HTML_MESSAGE,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 mail1.25mail.st (mail1.25mail.st [206.123.115.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 3 Jul 2024 14:49:06 +0000 (UTC) Received: from smtpclient.apple (unknown [49.48.245.197]) by mail1.25mail.st (Postfix) with ESMTPSA id 64FB660373; Wed, 3 Jul 2024 14:47:39 +0000 (UTC) Message-ID: <1AFD7AAE-8BEA-460D-88A8-15BB3D30A775@koalephant.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_2631F31F-5A3A-42A3-9688-ADF972336C65" Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: [PHP-DEV] Iteration III: Packages (was Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript) Date: Wed, 3 Jul 2024 21:47:26 +0700 In-Reply-To: Cc: PHP internals To: Vincent de Lau References: <09559430-4477-4516-8D78-6F4071E1AA6C@newclarity.net> <0182F3D6-F464-477F-9029-A2D0A8B50C71@koalephant.com> X-Mailer: Apple Mail (2.3774.600.62) From: php-lists@koalephant.com (Stephen Reay) --Apple-Mail=_2631F31F-5A3A-42A3-9688-ADF972336C65 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 3 Jul 2024, at 21:07, Vincent de Lau wrote: >=20 > From: Stephen Reay =20 > Sent: Wednesday, July 3, 2024 1:17 PM >=20 >> On 1 Jul 2024, at 23:33, Mike Schinkel = wrote: >>> Autoloading runs userland code. This means it has the potential = conflict between different packages with different autoloaders >=20 >> *Can* run userland code. It doesn't *have to*; FYI spl_autoload = (https://www.php.net/manual/en/function.spl-autoload.php) has existed = since php5.1 and works amazingly well.=20 >>=20 >> That "standards" like psr-whatever can't (read: choose not to) use it = says more about people and maintaining their little fiefdoms than = anything else.=20 >=20 > As a PHP-FIG Core Committee member, I find this characterisation of = people involved in the FIG offensive. My contribution, however big or = small, is intended to help the PHP community at large. >=20 If you choose to be offended by my opinion, I can't really help that.=20 > To come back to spl_autoload: That function pre-dates namespaces and = is highly opinionated on how to organise code. All lower-case filenames, = class per-file, files in include_path, full namespace in path, you name = it. If that is what projects wanted at the time, or even now, PSR-0 and = the PHP-FIG would possibly not even exist. >=20 It's less highly opinionated than either PSR, but that's my whole point: = it's *someone else's opinion*, hence it's opposed by FIG. Neither of which is the point I was making - someone claimed that = autoloaders are implicitly userland code. The point is they don't *have* = to be, and there is a perfectly useable one built in to the SPL = extension; if it's "too opinionated" (or the opinions are ones you don't = like), it's hardly the most in-depth of functions, and it already *has* = configurable parts, so adding in more control shouldn't exactly require = a rocket scientist to add, for example, the ability to use the original = case of the class name. --Apple-Mail=_2631F31F-5A3A-42A3-9688-ADF972336C65 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On 3 Jul 2024, at 21:07, Vincent de Lau = <vincent@delau.nl> wrote:

From: Stephen Reay = <php-lists@koalephant.com>
Sent: Wednesday, July 3, 2024 1:17 = PM

On 1 Jul 2024, at 23:33, Mike = Schinkel <mailto:mike@newclarity.net> wrote:
Autoloading runs userland code. This means it has the = potential conflict between different packages with different = autoloaders

*Can* run userland code. It doesn't *have to*; FYI =  spl_autoload = (https://www.php.net/manual/en/function.spl-autoload.php) has existed = since php5.1 and works amazingly well. 

That "standards" = like psr-whatever can't (read: choose not to) use it says more about = people and maintaining their little fiefdoms than anything = else. 

As a PHP-FIG Core Committee member, I = find this characterisation of people involved in the FIG offensive. My = contribution, however big or small, is intended to help the PHP = community at large.


If you choose to be offended by my = opinion, I can't really help that. 

To come back to = spl_autoload: That function pre-dates namespaces and is highly = opinionated on how to organise code. All lower-case filenames, class = per-file, files in include_path, full namespace in path, you name it. If = that is what projects wanted at the time, or even now, PSR-0 and the = PHP-FIG would possibly not even exist.


I= t's less highly opinionated than either PSR, but that's my whole point: = it's *someone else's opinion*, hence it's opposed by = FIG.



Neither of = which is the point I was making - someone claimed that autoloaders are = implicitly userland code. The point is they don't *have* to be, and = there is a perfectly useable one built in to the SPL extension; if it's = "too opinionated" (or the opinions are ones you don't like), it's hardly = the most in-depth of functions, and it already *has* configurable parts, = so adding in more control shouldn't exactly require a rocket scientist = to add, for example, the ability to use the original case of the class = name.






= --Apple-Mail=_2631F31F-5A3A-42A3-9688-ADF972336C65--