Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:105169
Return-Path: <gadelat@gmail.com>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 3070 invoked from network); 9 Apr 2019 14:01:37 -0000
Received: from unknown (HELO mail-wm1-f42.google.com) (209.85.128.42)
  by pb1.pair.com with SMTP; 9 Apr 2019 14:01:37 -0000
Received: by mail-wm1-f42.google.com with SMTP id q16so2945552wmj.3
        for <internals@lists.php.net>; Tue, 09 Apr 2019 03:58:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=mime-version:subject:from:in-reply-to:date:cc
         :content-transfer-encoding:message-id:references:to;
        bh=7ODkC2nnD9jr6sN4OB69rh4fuEPPnUHoKG0YkFHb1cc=;
        b=GuJiN2uE4D0RuGQZqAi2vsAwS9HZmRdMGK6hU8K12fW6hjR7H9GgbmN/IWcWOM9AfR
         q1CQkdkThWU2Oub/IqQBQrQN3bE2h6neHe/R8PZxSkxTqE7bju2CKvoSM9UOswfD2gUl
         BgWbDPpbODWa0L7bK7SfbkYs5c+OvY8Vwh/jfLzjK9sI8hxq9hTjgUWTVKFmJYFjGDK3
         rXuXYtfeF4a8Q+nlNAwJyNVFHK27ogP+4XFObszo9rP9D8Jq8zDwu/HVaEo7aRTonewH
         xbH2MUMCGWu72cWoRMEFLgd71liIFwioAI6eWqsosLTsQneszCmwIMocy3iay9WT6mNI
         kiBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
         :content-transfer-encoding:message-id:references:to;
        bh=7ODkC2nnD9jr6sN4OB69rh4fuEPPnUHoKG0YkFHb1cc=;
        b=eTLjKDQDP3LymSK45VxZ3Z92KTHHZC/wgDXpGjk4uzR2C0fXgDgyu+CbsfcOPudcpp
         q86FYF8/PA+jvfd8dBngvBt/JTvdftLtTkBEyFzsaQ9+KWq/YzeqrziE5uxZvPt0t7JQ
         TEdCb6aY1F7axZZz72iGjr8QuGI61LK/zRtL6MtJ4rZLxpOOZYWNxqQfAY8SXtJrZ8mn
         TRDi6lxSaK2SHelm4pGupEB1CqXxq7MkXvRLsyS12XKoBYi783eQTS8auvvLTwlnRbVD
         MDndl8M5rdSdt/uRIL1JR5tNoURVtzFOYMQcNFe3IFOEjkiqgY/WZ/BmqkpQn4SKLI+/
         WbvA==
X-Gm-Message-State: APjAAAUHP7BjRWjqsZ8bJJqrTHYH4CNNYZw5Gj9+BOW3KtHczZvmvYnw
	w7OHlmjEKSDIylopZR5DsyrcW1FCQyQ=
X-Google-Smtp-Source: APXvYqxlCPN+vLd5ALhNeFXzLBR39FuMAshFM8AZ88X8zyGp9OqPGf0LRiotRfQrtWPwijkENu0gJw==
X-Received: by 2002:a1c:7e8a:: with SMTP id z132mr22275880wmc.92.1554807508784;
        Tue, 09 Apr 2019 03:58:28 -0700 (PDT)
Received: from 2a02-ab04-01c2-6000-514d-5028-557e-a13d.dynamic.v6.chello.sk (2a02-ab04-01c2-6000-514d-5028-557e-a13d.dynamic.v6.chello.sk. [2a02:ab04:1c2:6000:514d:5028:557e:a13d])
        by smtp.gmail.com with ESMTPSA id t15sm15993436wmt.2.2019.04.09.03.58.27
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 09 Apr 2019 03:58:28 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\))
In-Reply-To: <CAF+90c_Xcz6rTq_CdAFdGBhW2eLDZOVEkLRgKgJZTwRQSsTTBA@mail.gmail.com>
Date: Tue, 9 Apr 2019 12:58:26 +0200
Cc: PHP internals <internals@lists.php.net>
Content-Transfer-Encoding: quoted-printable
Message-ID: <3BCEA463-BD9B-468B-AF26-E0AD75C5F559@gmail.com>
References: <CAF+90c_Xcz6rTq_CdAFdGBhW2eLDZOVEkLRgKgJZTwRQSsTTBA@mail.gmail.com>
To: Nikita Popov <nikita.ppv@gmail.com>
X-Mailer: Apple Mail (2.3445.104.8)
Subject: Re: [PHP-DEV] [RFC] Always generate fatal error for incompatible
 method signatures
From: gadelat@gmail.com (Gabriel O)

I see you are trying to solve inconsistency, but i would do it opposite =
way. LSP errors should be warnings, they are not show stopper errors. =
It=E2=80=99s very much possible code violating LSP keeps working =
correctly. And in modern PHP development, everybody considers warnings =
as show stoppers anyway, so impact here is only in production. When some =
LSP breakage sneaks unnoticed into production and my INI settings just =
silence these and log them, I would prefer it to not crash there, =
because problem with these show only when expecting parent but receiving =
child, not when child breaks LSP but its nowhere used in place of =
parent.

And this RFC conveniently shows only big LSP violation examples like =
array -> int, but not widely used narrowing like mixed/object -> =
specific instance.

> On 9. Apr 2019, at 10:25, Nikita Popov <nikita.ppv@gmail.com> wrote:
>=20
> Hi internals,
>=20
> A small cleanup RFC for PHP 8: https://wiki.php.net/rfc/lsp_errors
>=20
> This makes all incompatible method signature (LSP) errors fatal, =
rather
> than only warning in some cases. Especially after
> https://wiki.php.net/rfc/parameter-no-type-variance I don't think =
there's
> any reason to keep this backdoor in place.
>=20
> Regards,
> Nikita