Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108184 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27360 invoked from network); 17 Jan 2020 19:52:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jan 2020 19:52:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 035F218053D for ; Fri, 17 Jan 2020 10:00:01 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 17 Jan 2020 10:00:00 -0800 (PST) Received: by mail-lf1-f47.google.com with SMTP id 9so19021496lfq.10 for ; Fri, 17 Jan 2020 10:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F3JpIiuJNyvaSafOELQUsebiiCysBXMfuue9+M80Exg=; b=it7ylswMTTwILSZVmVcQXxp6+6UGj6NoClAZp/WELO/ZY1f1+3Q29a8EBCQcaeih2B iXLioKRW5S1YHoXsOQ36ly+daoOBXHYorRP/qrldMUgXnUBltN+aseThplOwnDUABek4 EUN5kNmikUN1SThCXXa0pm87afD+WV3bQqo4ZkiLHotbO0jpvehKieU4/5mH1S+9xTd8 ckzSURcZ5itjiAIAldTp+eJRf8qGh94I2QlCZjF8nrcolKQa/r2hL8ZJhImwd09UOjln vGgztt08XZlpIRykFj+BVudzBnIUcfQf3i+UcCLlB/F8rhZNat6flqAZvqfI7FFVfYyu FItQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F3JpIiuJNyvaSafOELQUsebiiCysBXMfuue9+M80Exg=; b=s6jv2McNGMQCyArA6UpOUAQnI1vlr1gRsi4V78GNnqmJIHrm8/8hxyycSfY+74Dg3e PiOegSk6PyE/Ey8vau1jg8/4aBXfVbUb1wzNBISDmk+6JceDP/oAh8U+cqTPAkVz6oOw oP6M+HxqNUy0diikC4dxGi43L/+X4e5fX87HZiWHBhgNZNnhf4SWKJ9GkMcO9YXX23oD 6vzv3jhnhOqkhnqGQ9nGjcYlViixkWQ2Xh/uX5XM8SAQ2xs35N+HhMIrcEaJ1Tw5DpMV /f3ogxEZJXjdx9VQvMsg9vVfd7NLUeFx50WP4SQKMBWe0Ny1VYD8y7hDmFuHVcXCewZ1 4jFg== X-Gm-Message-State: APjAAAUdxJGG+YRz0NhkkmBy/eC26+fVePvAgMTJa6b5+FHEUYpu/KPu yM2ZicdCDG+3DCffKotKXeZK3W7S4InbrMfRim8= X-Google-Smtp-Source: APXvYqybEGtanoH9KMT/Rwh9cH5w7HXzAwYeB5fQ1EU0yhBqHVDhzEYCCI7BHFbrl5M3FyBhFLOWXvQlIbEmLX7SZUY= X-Received: by 2002:ac2:4add:: with SMTP id m29mr6061649lfp.190.1579283998149; Fri, 17 Jan 2020 09:59:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 17 Jan 2020 18:59:42 +0100 Message-ID: To: Niklas Keller Cc: Bob Weinand , PHP internals Content-Type: multipart/alternative; boundary="000000000000b59242059c59b551" Subject: Re: [PHP-DEV] Warn when declaring required parameter after optional one From: nikita.ppv@gmail.com (Nikita Popov) --000000000000b59242059c59b551 Content-Type: text/plain; charset="UTF-8" On Sat, Jan 11, 2020 at 2:35 PM Niklas Keller wrote: > Hi Nikita, > > while this is a rather small change, it has quite some BC impact, as > not all old code has been adjusted to run on PHP 7.1+ only using > nullable types. > > I'd like to see an RFC with a vote for this. > > Regards, > Niklas > I was interested in seeing how prevalent this pattern, is, so I ran some analysis on the top 2k composer packages. I found 527 signatures that would throw a deprecation warning with this change. Of these 187 are potentially used as "poor man's nullable types" (the optional argument has both a type and a null default), while the other 340 are definite bugs. Regards, Nikita --000000000000b59242059c59b551--