Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124201 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 A18571A009C for ; Wed, 3 Jul 2024 15:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720019196; bh=EEUIE3Exdmq8WnoXV9qe8oFEncSUv1fuEff7t3aMQCg=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=QEUHpaBzi+5EauXvZsM2oLK/Ie/g7TQQQaG1dPiU7D8tLToxuLpPL5LGm5+0hWCYh wbxb2HaoNi85FHv5GfGZtuCFLmzKHFntBXvhPTazX8i+OxqIC4ll9dNNdiddaiPPlO dy4CwCVx4u3BPuQRtASKESLWRUNoDM/Hrf21b8+3G66Nfl0f2Wx5+D4lEiCL7XRJua Czf/iSJ1iLyjjAr9dmFsonrkgfJifc3n5J5qbbu883sTo4ws808H2yTn5sGYlNO7n7 F3xtVgqzZsZWHQhYWNumHrYM4epK4Nt4CFNALaK2WRRsVwAeI/Jk3oPkkHLo3B0ims HbbkfCnZOILcw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 243971806BB for ; Wed, 3 Jul 2024 15:06:35 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,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 fout1-smtp.messagingengine.com (fout1-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 ; Wed, 3 Jul 2024 15:06:34 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 6399F13801FE; Wed, 3 Jul 2024 11:05:12 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Wed, 03 Jul 2024 11:05:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc: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=fm3; t=1720019112; x= 1720105512; bh=EEUIE3Exdmq8WnoXV9qe8oFEncSUv1fuEff7t3aMQCg=; b=E EkDATh1+vM6RUMuVCTefYpeQAorv3hzYe0Is1T7WnR6ngevLRbD1Tr0eNq3K6eZy K73bfM7Sj75/ozZAYgwN0jOS33m5XHrktbnwWhq5FCEotm/31PKrEpwap3eifOwK RyvM7paWk4PMol7svV0jDDsBS+LWimFGjfQflEVtgwy8u/Gza3NiaPJ/wnfTvJmf QLxApOf5p6Dl+yUUVr7ViQh4E9O5coKKIo4pd7pZo9CQnFGNyjnYUbqGaM3Piidk yU2povOo+7dYrK+z/nbGPRJkEm+ZTK1IPHZ5nP/npEGnDPaQs1ggiMGEOSxB7xbG Sir3d/qLgSd2ohXyuStrA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1720019112; x=1720105512; bh=EEUIE3Exdmq8WnoXV9qe8oFEncSU v1fuEff7t3aMQCg=; b=GPAxL8fphI08V4ekHRWUa3/fEh13Zlt4IaWwnktiDPtp gZj+1QRdWWIfcQ/kGg3Fx4x+X1CHkGvHRDdMetB6vHkiRjom+lQ5ar0kcbAVmyzf fXneE/qmGNWxJ/QidzdMik0yWAcAaLQ2KTjR5FvJwqm7oTO/oMsVR1sZD//d1ZBO PdipOgj5oaOzMq5JE6lAklUDE19jre/6+F/UlsbKOda7NW8IcY5bSGHeucL0wrcR RX5r4QANNi66h9UsHmAKou/w4VJVvYOgj/4NGwBrlPAPhW560DJafj7ENHouFGHL bz0vKjuNF2giOUAiHwaRiElYYycaLfIoWpOa8qlXuQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudejgdekfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreerjeenucfhrhhomhepfdftohgs ucfnrghnuggvrhhsfdcuoehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrg htthgvrhhnpedvheekteelveetfeevgeekgfffvdeuhfelveehvdetiefggedtfeejheet gffhueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hrohgssegsohhtthhlvggurdgtohguvghs X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 05B3515A0092; Wed, 3 Jul 2024 11:05:11 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-566-g3812ddbbc-fm-20240627.001-g3812ddbb Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <78465ebc-0e87-4033-babd-656e46fe8341@app.fastmail.com> In-Reply-To: <1AFD7AAE-8BEA-460D-88A8-15BB3D30A775@koalephant.com> References: <09559430-4477-4516-8D78-6F4071E1AA6C@newclarity.net> <0182F3D6-F464-477F-9029-A2D0A8B50C71@koalephant.com> <1AFD7AAE-8BEA-460D-88A8-15BB3D30A775@koalephant.com> Date: Wed, 03 Jul 2024 17:04:51 +0200 To: "Stephen Reay" , "Vincent de Lau" Cc: "PHP internals" Subject: Re: [PHP-DEV] Iteration III: Packages (was Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript) Content-Type: multipart/alternative; boundary=d7e87f40edb8494792427bc4f9c0b357 From: rob@bottled.codes ("Rob Landers") --d7e87f40edb8494792427bc4f9c0b357 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable >> 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 >=20 > It's less highly opinionated than either PSR, but that's my whole poin= t: it's *someone else's opinion*, hence it's opposed by FIG. >=20 >=20 >=20 > Neither of which is the point I was making - someone claimed that auto= loaders 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* configurab= le parts, so adding in more control shouldn't exactly require a rocket s= cientist to add, for example, the ability to use the original case of th= e class name. To be fair, I didn't know this was a thing (you learn something new ever= y day) and I'd rather have all-lower-case filenames, so I may actually l= ook into this. I wonder if composer exposes this as an option? =E2=80=94 Rob --d7e87f40edb8494792427bc4f9c0b357 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable

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


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 p= oint I was making - someone claimed that autoloaders are implicitly user= land code. The point is they don't *have* to be, and there is a perfectl= y 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 exampl= e, the ability to use the original case of the class name.

To be fair, I didn't know this was a = thing (you learn something new every day) and I'd rather have all-lower-= case filenames, so I may actually look into this. I wonder if composer e= xposes this as an option?

=E2= =80=94 Rob
--d7e87f40edb8494792427bc4f9c0b357--