Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125032 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 CA6C31A00BD for ; Sat, 17 Aug 2024 21:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723930535; bh=Qe7qFfe4ot+ZqPJhG4RiXDcboPF8F3z+Vm6uDdWMyiM=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=AgtCwaJe6Urz+rLn5J96xt2/rrrPgTG57LI95jstkDNTtFCCP//eNxMZzSvSCjo8G RxNBPkiAz7eHZvMG97D8CojD5y0/cUtoC4OtjIBSgvBJLe65b+3IMDnT2vq2AIRJz/ RSalpxTBwI09fXTVFGEUMV6n1m1+Ln8eEWfVhEDzBxERh/v3vkE3izvkKaUziL4hle 4lYjCNW7C/UUGgBYESzJ1viS6q83qI9cdF9nPckr4fWAraZsQZYSN8XSI1gp9zvLE5 5wSE3idypPxFWIC7xrUoGvlqeH3GhL1R32Tgws1v4bnL6gDmyy2Q9vAQauR0nN2AwK U233CvWiR9EqA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1F9BD180072 for ; Sat, 17 Aug 2024 21:35:34 +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 autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (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 ; Sat, 17 Aug 2024 21:35:33 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 6349A114E9CF; Sat, 17 Aug 2024 17:33:44 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-03.internal (MEProxy); Sat, 17 Aug 2024 17:33:44 -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=fm1; t=1723930424; x= 1724016824; bh=Qe7qFfe4ot+ZqPJhG4RiXDcboPF8F3z+Vm6uDdWMyiM=; b=T 8LhqaWIgHFUfaVbLM3WW5Kf7RhuYXUJFx6dmc363y46yngf++laI/sF9Kj4v7aRI IS7y5N+tZUzQCJtSB7j5+nHAG7bCvWBXcM+bnc4f9/HAgyYvL7a2BTSWoL0cGnKN 5ILMK3Z6Stzu/OAGfa9iwWwMgGz0K5J1jhDz4EUcKYuAFaDAPGXNBveXQQUcGYBu TceoHj1rwHuPWHGdoK7n6l7/FwRbkyZasjJ65PtNiLrM0mcbMFXI8C8tSQlVPswf LnJvl2Wuogug3c92ElcZ7VaPAQ3QoO8FBZa9j6w0G4YTQ5nbAZGz3UdhNs3/GkWa dOUwC1mpTyNHr2B3PW94g== 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= fm3; t=1723930424; x=1724016824; bh=Qe7qFfe4ot+ZqPJhG4RiXDcboPF8 F3z+Vm6uDdWMyiM=; b=pbnr9/zagHxRvOvkXqb6NH1TL/xpVrPbXlJaVpAO563T UavxdpEdfs96FTUBuJHAcpH3nRFeuSvV0WlTvOfRPdRPR/78GeoPzTT0gBvYPQkm uG1t2af6uk34LGGTluMrXViqMfjrSJ8uxTN/7uQEuDVPDDI6i0pD53a31sodSwNI e4vpBqNVO4TXLhhfnVo9K+KqLiDRMVDax/X8Tio4vb8QYpUsJ/1qrE1a4XcIkSdU amkHTgxwdkVW028+qA/+CrWNs/LxhbR3G2ZcW4Ft67BKbr+OalQLVJx5wfQLSs1A lBpzMrqk12VeMKqASlBU37V9GygsQnajCqLWk8ehoQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudduudcutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffrtefo kffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepofggfffhvfevkf gjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcuoehr ohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtthgvrhhnpeetieeigeejff ffhefgiedtjeffgfefuddugfefffelhfekhfegvdfgudejffdutdenucffohhmrghinhep ghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprhhosgessghothhtlhgvugdrtghouggvshdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhhphdqlhhishhtsheskhhorg hlvghphhgrnhhtrdgtohhmpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdr phhhphdrnhgvth X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D584915A005E; Sat, 17 Aug 2024 17:33:43 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Sat, 17 Aug 2024 23:33:03 +0200 To: "Stephen Reay" Cc: internals@lists.php.net Message-ID: In-Reply-To: <94259551-80EE-41F4-9CF9-679B79B5EA49@koalephant.com> References: <94259551-80EE-41F4-9CF9-679B79B5EA49@koalephant.com> Subject: Re: [PHP-DEV] function autoloading v4 RFC Content-Type: multipart/alternative; boundary=7996b196146d4e929c0d34cee186c7bd From: rob@bottled.codes ("Rob Landers") --7996b196146d4e929c0d34cee186c7bd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Aug 16, 2024, at 02:22, Stephen Reay wrote: >=20 > Sent from my iPhone >=20 > > On 16 Aug 2024, at 04:45, Rob Landers wrote: > >=20 > > Userland functions don't throw that error, so it shouldn't be an iss= ue. (You can pass as many arguments as you want to a userland function, = as long as there are enough of them). >=20 > Hi Rob, >=20 > I didn't mean the actual internal error about too many args I meant th= e concept - it's possible a userland autoloader callback has some signat= ure other than a single string parameter. >=20 > I don't know if that happens in the wild or if that's considered a BC = or not but there is a hypothetical case there where old code would stop = working. >=20 > Cheers >=20 > Stephen=20 >=20 I wouldn't consider it a BC break, no. But (ironically?), Symfony crashe= s with this change. It really shouldn't but if you take a look at https:= //github.com/symfony/symfony/blob/7.2/src/Symfony/Component/Config/Resou= rce/ClassExistenceResource.php#L70 and it's definition in https://github= .com/symfony/symfony/blob/7.2/src/Symfony/Component/Config/Resource/Clas= sExistenceResource.php#L142, you'll see that they define a function that= accepts two parameters. It crashes when it receives a second parameter = of `int` instead of it's expected exception. I've opened a drive-by PR as an attempt to fix it (https://github.com/sy= mfony/symfony/pull/58030), but I suspect there will be other projects as= well that do something silly like that. They'll just have to fix it. =E2=80=94 Rob --7996b196146d4e929c0d34cee186c7bd Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Fri, Aug 16,= 2024, at 02:22, Stephen Reay wrote:

Sent from my iPhone

> On 16 Aug 2024, at 04:45, Rob Landers <rob@bottled.codes> wrote:
=

> Userland functions don't throw that e= rror, so it shouldn't be an issue. (You can pass as many arguments as yo= u want to a userland function, as long as there are enough of them).
=

Hi Rob,

I didn't = mean the actual internal error about too many args I meant the concept -= it's possible a userland autoloader callback has some signature other t= han a single string parameter.

I don't know= if that happens in the wild or if that's considered a BC or not but the= re is a hypothetical case there where old code would stop working.

Cheers

Stephen = ;


I wouldn't co= nsider it a BC break, no. But (ironically?), Symfony crashes with this c= hange. It really shouldn't but if you take a look at https://github.com/symfony/symfon= y/blob/7.2/src/Symfony/Component/Config/Resource/ClassExistenceResource.= php#L70 and it's definition in https://github.com/symfony/symfony/blob/7.2/s= rc/Symfony/Component/Config/Resource/ClassExistenceResource.php#L142= , you'll see that they define a function that accepts two parameters. It= crashes when it receives a second parameter of `int` instead of it's ex= pected exception.

I've opened a drive-by PR= as an attempt to fix it (https://github.com/symfony/symfony/pull/58030), but I su= spect there will be other projects as well that do something silly like = that. They'll just have to fix it.

=E2=80=94 Rob
--7996b196146d4e929c0d34cee186c7bd--