Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125672 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 8C32A1A00BD for ; Tue, 24 Sep 2024 20:00:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1727208176; bh=zXrSZTOwiLcLZH2mMJGljVLZ87CoMjFbqW5LGrEpruI=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Be9xvOB5NSw+9D6OPEs+YZZM5VmRV5RXwOnWh9s3ITo6Cjuj09fATXIzgqh3WQm03 QdjpuGkLtZbnSdq9eVETomF1CuK5uBYD5aCUpZ1BxaCJsNY2+dAhg/A4TI0DNIzBlH hIiJ154SR4/ePOxZhvrBABDONYIeCYpfUrH0+u9ZJ4kbch3EosmUbkkkaKVRuEKTd2 u2GnWfVVmZI+vQHB2YZLh3q1bhPkqkFNEMGqWmd35wH9e8W42HkjhARK5Mxn0aOuBP GVTsfTnOCJa7J0VSy8NWMrPPlCGMUhvaTfr+4FiH6YdxCAwSr7PcgZ8CDzyUbPju/k Tlf2GuGtrJ/eA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BF7D2180084 for ; Tue, 24 Sep 2024 20:02:55 +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=4.0 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_NONE,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (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 ; Tue, 24 Sep 2024 20:02:55 +0000 (UTC) Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id 91D501380281 for ; Tue, 24 Sep 2024 16:00:44 -0400 (EDT) Received: from phl-imap-12 ([10.202.2.86]) by phl-compute-09.internal (MEProxy); Tue, 24 Sep 2024 16:00:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1727208044; x=1727294444; bh=hsiX2beGxIdx8x+cTK42s0kY1AdO 7xdMst42vYlQr6c=; b=U4DUQgkmYRdJuIO7zS95rd9ypH37yjVj+3CYSSroE3HD DfpX3/cgC8VjZ1gAw6xrouWoQ8BwUc8Q4UfGIFpqwNYGJJTiMXO1kW+kRttFFZly pkn0+KYxQCdj9JyVDxvFpLk6M6hH4x9WRpHUjib1nZfZ0l+Q9Ym8MfEzvnDkQ+Y/ +MErDg1rSMy5NcPtLrsFh1zepzUqH7Vb3qJiv8emFJinlnsahAIIVsOxUu5Tn6ts 2txS5F1T+NBERMoLxrG4jmim0FY9IoXnR5sHCQMyNs30LYRge7RHmOMagvJpkGmQ G6HyUeSGwRaqojweN+Y8AC5JhCKok/sq0S0MfjOO3w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddtfedgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtsegrtderreertddtnecu hfhrohhmpedfvegrshhpvghrucfnrghnghgvmhgvihhjvghrfdcuoehlrghnghgvmhgvih hjvghrsehphhhprdhnvghtqeenucggtffrrghtthgvrhhnpeekleeftedtteegveeljefg leejgfegudeugfefveegkeehueejffeufeehlefgkeenucffohhmrghinhepphhhphdrnh gvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehl rghnghgvmhgvihhjvghrsehphhhprdhnvghtpdhnsggprhgtphhtthhopedupdhmohguvg epshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhp rdhnvght X-ME-Proxy: Feedback-ID: id4f946ef:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 4F4761C20066; Tue, 24 Sep 2024 16:00:44 -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: Tue, 24 Sep 2024 22:00:24 +0200 To: "PHP internals" Message-ID: In-Reply-To: <1c37882a-a8b9-4754-bc2c-bee43aa39d6a@gmx.de> References: <8de40002-1b2c-4baa-bbcf-997780e8a6ac@gmx.de> <1c37882a-a8b9-4754-bc2c-bee43aa39d6a@gmx.de> Subject: Re: [PHP-DEV] [RFC] Warn on conversions from resource to string Content-Type: multipart/alternative; boundary=601a0f76d6aa40a4aa446bb3c81bd73a From: langemeijer@php.net ("Casper Langemeijer") --601a0f76d6aa40a4aa446bb3c81bd73a Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, ssh2 maintainer here. Low maintenance is indeed somewhat accurate. I review and merge PR's, have done some minor work on it, and do releases sometimes. Some others on this list have done minor work on it too. On Tue, Sep 24, 2024, at 19:53, Christoph M. Becker wrote: > >>> Let me know what you think about it: > >>> https://wiki.php.net/rfc/warn-resource-to-string > >> > >> The ssh2 wrappers[1] used to use this "feature". I'm not sure whether > >> there is another way to accomplish the same now. If not, that should > >> probably be done prior to emitting a warning for the resource to string > >> conversion. > >> > >> [1] https://www.php.net/manual/en/wrappers.ssh2.php Indeed, the ssh2 extension uses this. I'm not sure what warnings on conversion to string would bring for PHP developers though. The places where resource values are still used are all in very technical functions. Most developers will use some wrapper class, or of not very likely know what they are doing. Personally I've never accidentally echo'ed a resource and wished it would have registered in my monitoring systems. Secondly, I don't think it happens very often. (not nearly as much as array to string conversion has hit me) As a third argument against this RFC: We're moving away from the resource type. Processes, sockets, curl and possibly others that have escaped my attention have already been changed to objects. I've already concluded that ssh2 should follow and use an object, at least before resource will be removed in core. I've noticed stream also still uses resource. Greetings, Casper --601a0f76d6aa40a4aa446bb3c81bd73a Content-Type: text/html Content-Transfer-Encoding: quoted-printable
Hi,

ssh2 maintainer here. Low maintenance is indeed somewh= at accurate. I review and merge PR's, have done some minor work on it, a= nd do releases sometimes. Some others on this list have done minor work = on it too. 

On Tue, Sep 24, 2024, at 1= 9:53, Christoph M. Becker wrote:
>>> Let me know what you think about it:
>>
>> The ssh2 wrappers[1] used= to use this "feature". I'm not sure whether
>> ther= e is another way to accomplish the same now. If not, that should
>> probably be done prior to emitting a warning for the res= ource to string
>> conversion.
>>= ;




--601a0f76d6aa40a4aa446bb3c81bd73a--