Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:128089 php.internals:128090 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 8244F1A00BC for ; Wed, 16 Jul 2025 18:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1752690371; bh=cbU+IS+UcHLRHJw6+4TxPq2YBg8q7Ke34B1H7bSfb+M=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=e5mY82fmaknNjoLn44YIyXeRp4UyGv1qZAMSUzUwajq68iVRJl+DxsCRkJCU0q/jm 7P0JpdafSEzTbn5tGBHUuP8xEnvTKhyHCXjJd1iPWmrY46wpZk4h38pxiI+ER/joAa cGDaDNktWPf1bFrugUkqe+qIVL0kL2MXUd5lLOTKvcnu2sBxnIVKu3eFmnEfuGZsWm qOs4QvwcxZooWZleQyhdXOyy6aDv3cV8qb3Z7tiGMGGcBfDdCdRrI11A0EvoXBJ4Cr Pa50o+5jYNfcw165OGNth88QO9bEEu82JR/AzommYUARgVH5iKSpRaFvrNc36prasT vplEbEXgAYnTA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DE83F18006E for ; Wed, 16 Jul 2025 18:26:10 +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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_NONE, 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 premium76-5.web-hosting.com (premium76-5.web-hosting.com [162.213.255.108]) (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, 16 Jul 2025 18:26:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pmjones.io; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Mime-Version:Content-Type:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=cbU+IS+UcHLRHJw6+4TxPq2YBg8q7Ke34B1H7bSfb+M=; b=HiF30Rd5SvQAhAs9rdql/9z/V1 waRf/yAfdnJY7k12levH/YUoGzVeVB4nyyOq8M2VzwPHN0dzVM1DydNnA2NdH9Cf7f32BXwqUkUH2 p3hyziaUMCr8HRMaUhiHD56MR7jBJvSLepU8D6mrkqsLWlb1y1MCid25E/+4RgTqxYBdwiLYxGS1h 80YV5+3LZBG9B9sHlSfnviJ5Ok+RJw+S8Wwcli3/7VTGG87YMMiH4CCO3n+zPKW+CLoj3uV8ufc/9 RQFzrj9wG4WtS3hVw1OmNQNoZ1HDCzbaGxhav/DY7mKakRElKbzAmRUpbq4rnADzFTWj8wU71z6QM gvsiDueQ==; Received: from 107-223-28-39.lightspeed.nsvltn.sbcglobal.net ([107.223.28.39]:62051 helo=smtpclient.apple) by premium76.web-hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1uc6rD-0000000GL51-3OV3; Wed, 16 Jul 2025 14:27:55 -0400 Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: [PHP-DEV] Discussion Short Constructor In-Reply-To: Date: Wed, 16 Jul 2025 13:27:41 -0500 Cc: Larry Garfield , php internals Content-Transfer-Encoding: quoted-printable Message-ID: <2F7F0393-1E16-4040-AC5E-E3D878FA5A91@pmjones.io> References: <1ecc1fd2-3837-4409-98c8-543b26de4955@app.fastmail.com> To: Deleu X-Mailer: Apple Mail (2.3826.600.51.1.1) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - premium76.web-hosting.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pmjones.io X-Get-Message-Sender-Via: premium76.web-hosting.com: authenticated_id: pmjones@pmjones.io X-Authenticated-Sender: premium76.web-hosting.com: pmjones@pmjones.io X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched From: pmjones@pmjones.io ("Paul M. Jones") Hi all, > On Jul 16, 2025, at 11:40, Deleu wrote: ... > The blessing and the curse of PSR-4 is that it spoiled us (or maybe = just me?) to: >=20 > - never think about `require/include` > - never think about composer.json > - never think about how classes/interfaces/traits are located > - IDEs will auto-import stuff so I don't even need to think about = `use` statement > - I don't know how to debug "Class not found" issues because the last = time I saw an error like this was 5 years ago when I was trying to mess = up with custom autoload capabilities in order to declare multiple = symbols in a single file. As the lead on PSR-4, I appreciate (and am sympathetic to) this list, as = well as the pros & cons of one-class-per-file (which originated with = PSR-0 and the Horde/PEAR standards before it). > Maybe I'm alone in it and then it's fine for it to be just my problem. = I'm sharing here in case it's also someone else's problem and we can do = something about it. But please don't tell me it's not a real problem. You're not alone; I hear similar stories from time to time. Larry may be = many things, but he's definitely not the final authority on what is and = is not a "real problem." I am open to developing an extension of, or alternative to, PSR-4 = autoloading that would allow for multiple-classes-per-file; please = contact me off-list if you're interested in pursuing that idea. -- pmj