Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122170 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88507 invoked from network); 17 Jan 2024 21:14:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jan 2024 21:14:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1705526093; bh=um132GNSDCSINBGKqOZ/z8iNa7zjlX1sTxYLuZ4gp+k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nUTkGGyQl45c/wa28Z5H7VbHFfI3HhF3V3Y9Vyy9oLnIiMZi4ciR7Pr1ihI4O0qgE RZ7euKlnK1X5auM13K9PfUrtlHnP4rryOEbUhid/p4qg7GA8dxip4P18A5PBndMIkH bk+whH7ix2f1iM0wYr00jJmENBBAOe0SmOH0xYnTTFgJoMQUEl8xpflIkZuoQgWjyZ yQRXPcZk6uQYaxT68rvNgWUdb9/FsIkRQZ/DOAd1iZrHQMVso1L0/wJs/xQpMr/55J jICOWbIV4G8wPMWiJTFPEYmswFaZtapmZAB8b+FmTITna9FqH081jAw9hgiCM2Xxba nspqSgZDSYzKQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3686818005D for ; Wed, 17 Jan 2024 13:14:53 -0800 (PST) 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.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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, 17 Jan 2024 13:14:52 -0800 (PST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-40e7065b7bdso44615235e9.3 for ; Wed, 17 Jan 2024 13:14:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705526051; x=1706130851; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=um132GNSDCSINBGKqOZ/z8iNa7zjlX1sTxYLuZ4gp+k=; b=JuXOmrpU2wVl0ZCo8R8OZJ+uiM4UelmAm0ctMQmacR17HaZS5VYp4UxHpu9elQXVa2 wgCMeef6ylvz/832Tnvowx4JKTXWwqIjFE/IPvqCWKtVRKrQQd8i8IQeRRJXxOFp5BwM 67bgDX9oOKgwQEY+eQQNVWscYbPy8fAnOJKlPoFSU8Gf4FZMSFYXurD+jNKzkrPerp2i tcxYfR+ryq3JHRRPXbaHHsupXeuoAlKzSnMS5K6DweS2AY621GwkWAzsoMG0Pnzs733q yJTKhGmQG2yhO1mKtm0UA3PL/aqxJ0RH/rTWlwSGdzCK/vM0N4KE5ULOXKhK35hBPsSN AZkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705526051; x=1706130851; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=um132GNSDCSINBGKqOZ/z8iNa7zjlX1sTxYLuZ4gp+k=; b=dYKNR8KmT7+QeUrFpGYFQ5L5qmdazPrnn17d6gECqE1Y4oap93mnx8zg0/RDHNVJuS 9eanT3HNLcJzmrO7Qc9Agld512BSdADbt58G+iud5JxaVsiPc9yh5/tj555XbuWICrjz drtiPdXdq5VFMAlvFLrlucZdtp5oAgpmwT8jhfne7BVk1IH557zrj0v//bkbE7U3JuMF R5uYgjUvvD3Iq/TMlP75sJEFZWW3VT6wR5pyFXoNS8EW8gpnmRPKFpTyXsZRSetzpbeP jNv6YCUrFhFaRFvY/CWIFZgzx3ALTqbr5x/KInfQ5CFKEF760eAqegKHSwSXd30LPyrG Eepg== X-Gm-Message-State: AOJu0YwjtH+Akn7T4/xSCW+cSfHYUuOCA+Z+2+k16Ia/9llPLM1Hx9SC +LJiA0fWCMQjEefUn8Ee7OaL9Ac4TkHrAnAqD/Bn6gFianM= X-Google-Smtp-Source: AGHT+IHq5Es5pylkFcozt+ZuBGPEL9UxH8R2lnIwx75U6z3LCAZ1i7ZHLrSjrWOiZWbnoo2OyNWrtK1FL9fZQHwNfps= X-Received: by 2002:a05:600c:3504:b0:40e:61eb:34b7 with SMTP id h4-20020a05600c350400b0040e61eb34b7mr3520670wmq.157.1705526051354; Wed, 17 Jan 2024 13:14:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 17 Jan 2024 22:14:00 +0100 Message-ID: To: Jakub Zelenka Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000723b5a060f2aba52" Subject: Re: [PHP-DEV] Dedicated StreamBucket class From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000723b5a060f2aba52 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jakub, I just submitted feedback to the PR but will also mention it here as it's > probably more an API thing. The problem that I see is that it combines tw= o > distinct things and create quite ugly self reference inside the proposed > StreamBucket object. I would prefer we split it and introduce > StreamBucketHandle opaque object that will completely replace the current > use of bucket resource. The actual StreamBucket could be introduced later > (ideally in PHP 9 as it's a sort of breaking change - change of class). > I agree with using a two step migration approach, and that's why I only changed one part for now: the containing object, leaving its resource property intact. However, as far as I can tell, there's no need to create a separate StreamBucketHandle object when migrating the stream bucket resource to an object, but we could inline it directly into the containing StreamBucket object. I'm saying this because the stream bucket resource property is only used by two functions: stream_bucket_append() and stream_bucket_prepend(), and I cannot imagine any other use-case where having a StreamBucket::$bucket property would be useful (but correct me if I'm wrong, I'm not the most experienced with stream buckets). > I think it's more typing issue if someone passes this object for further > processing and type hint stdClass. Possibly the pattern above could be us= ed > for copying but seems quite unlikely. Still I would see this as a BC brea= k > and it is not really related to resource to object migration. > For me, it seems like a subtle edge case which could be addressed by explicitly mentioning the change in the UPGRADING file. But I got your point, and I'm ok to submit an RFC. Regards, M=C3=A1t=C3=A9 --000000000000723b5a060f2aba52--