Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126050 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 BBE961A00BD for ; Tue, 26 Nov 2024 00:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1732581977; bh=9ozlemn4oGDL2QKyU2mEa5llBSsdthiYhXvjKehBCGs=; h=From:Date:Subject:To:From; b=hro4zvDCWN3yFHnjwBJYDA8sYCtTCbiPdCaApmL7oXBz4Q2U4x3x3vFBiLUU0kyW4 1ngU85moLrBgrciWs1y1O5/+z97YSurL/LWPKcWuJpPncD9hHV4AGIPl6Co7YfixSk 3DMpgVti8pIuDqW9zr0/lfV5WY0muYqEeYZ0VRQ6LCrBxnIxrspzTWhVGWgsENn5Wa pffjDSbvLQJcg0iXKrym1ZnR6bnlbAPz2iFkqK5DZMvPxYVtnaa7Eh9GGWdJ1ho5OD 4cQ+AKi655ABUcMqgzMlctAJ21v4E725p8mqiCMkG5zgMGbXo886gJbSX+m6IHQ3la fvoQ+glOea2qw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0897D180050 for ; Tue, 26 Nov 2024 00:46:17 +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.8 required=5.0 tests=BAYES_50,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-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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, 26 Nov 2024 00:46:16 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5cf9ef18ae9so11375569a12.1 for ; Mon, 25 Nov 2024 16:49:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732582165; x=1733186965; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=U9u+1vsOk+CICCIDNAGUZw4TfouoPXI++7DiR9Bmn6E=; b=IrGAYmkADRT88/BycXvdy3RWs0Cr377tsSzuk1lCvKLqtIHINcE98zablqP0R5V7B0 0+OlBwS/b/NOqI+BWnbrZc0HLRyijt8qWXZTtzyLiCW4NzWHY4i86JlYm26EOm6j6HLN o9J0ZDyMkOG1/R2M1UcHmfyR3Lrj2Vh8f0u3ut2Guhq+ZEMXWGvWsnutsnuQdloXE40y +rEWS825SxYFIz8hKgDnLC4oPD5zoxXJJQRSi4PTfjrzdy99X5XY84s086zajFi0hbnM +jEFvSYp6oXRTalNAYeaEUrb10LTDmfA4+rEW7eaN7JuQjsnGi1tGpDjJA/5MWsZtotY ZMYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732582165; x=1733186965; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=U9u+1vsOk+CICCIDNAGUZw4TfouoPXI++7DiR9Bmn6E=; b=SDt6Ht7kQbdxrGrcZcRTJ+xWURTO5/6v0xiilcCGrvzRoAmDA1o+KQMHo7qRp7W7rx yDlTLQhhVvCxCeZY47QfpxwYk0Efa9LjFOGZajBIfk4ju/YmF24StmcNa1nj4WDTmf0T a2qwUbEiRAxAbnB7bc1U+3Ru7fflatD1WHc43zXbN1QpqYCYzLGXXvlwCkUXX5sE5Lm5 ihbgC8ztTDsWzHKwYsCc79CvdJ9oyDcO2K4RBc22WyM4HoeH8kf3X9bD2Dct/hSPyydy NvFWkghDHYNHmqRvRqP9JX2QlwFwA3cBfOVNhfzNz5by/nxhCSGB3lO7F/Qvxl8UObW+ lQgw== X-Gm-Message-State: AOJu0YxCzW2W64M2Y7rm6NcnvSatfd0JzfPj2iURNonclQXhO8tJNmkD JmBIAFbVy6IzYx+ciREZsniiKNA/u8IAUN3R+/+I9VPGM4atV3akEu/F7w2ddgvUX5bSJ0Qn3VM I9w98FGe6PE5eKL1ljvWfb7CcP0zuLW4W X-Gm-Gg: ASbGnct6E2IFm6jnXMDsM4LoivdN8QzUZLqbfN86yHz8xZXNFMbxHqGjmLTdG+odJKD L9I+m5s57r1UG+oLLOdif0V/+5ktnPju/4YjaisksOyyw8aAVVfGOJYup+rJHwJmXIw== X-Google-Smtp-Source: AGHT+IE4xXzq1N/dkJTrN6qqD8DMwm0WQtQqC9F/eHAFc0I7EV7KLrs4JA41gBLsQPqeG0P+aukWwI7zuwXr92iSZko= X-Received: by 2002:a17:907:830a:b0:aa5:d07:d890 with SMTP id a640c23a62f3a-aa5648b8407mr123573166b.24.1732582164935; Mon, 25 Nov 2024 16:49:24 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 26 Nov 2024 02:49:14 +0200 Message-ID: Subject: [PHP-DEV] Needs Feedback - Yield without value in reference generator function does not create notice To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000007c3dee0627c63863" From: aggelosbellos7@gmail.com (aggelos bellos) --0000000000007c3dee0627c63863 Content-Type: text/plain; charset="UTF-8" Hello everyone, In this issue #16761 it was verified that in the above code it should throw a notice for both yields: ``` which adds the "missing" notice but we aren't sure on how to continue on this. There are 2 main questions: 1. Should we continue with adding the missing notice and merge it also in master? 2. Should we deprecate / remove the usage of yield without value in reference generator functions? - Aggelos Bellos --0000000000007c3dee0627c63863 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everyone,

In this issue=C2=A0#16761=C2=A0it was = verified that in the above code it should throw a notice for both yields:```
<?php
error_reporting=
(E_ALL);
function =
&y()
{
  yield null; // warning=

  yield; // no w=
arning, agreed to be a bug
}
foreach (=
y() as &$y);
```
I have created this PR There are 2 main questions:
  1. Should we continue with adding the= missing notice and merge it also in master?
  2. Should we deprecate / remove the usage of yield without v= alue in reference generator functions?

= -= Aggelos Bellos
--0000000000007c3dee0627c63863--