Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110562 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 35020 invoked from network); 16 Jun 2020 08:14:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Jun 2020 08:14:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2D0C61804CE for ; Mon, 15 Jun 2020 23:59:27 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE 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-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 ; Mon, 15 Jun 2020 23:59:26 -0700 (PDT) Received: by mail-qt1-f173.google.com with SMTP id j32so14674663qte.10 for ; Mon, 15 Jun 2020 23:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=LuL3GNYcrO1zmZoplDukH9M4RIQtyGS3DtUs8zebHlI=; b=SeiDJxfQr2GJT4XCx1UV6Jy3KZLdyMofuQmWEFDBN/NeQu6Agmi1YOXA6qo8Z6sp7v U+7QHfNlbmjQBZJOardAFWXl+LVp6V8UAozo+tnFcK0XWl/DurLdvREnTHYA2Ro6/owg pr7sRZGzZxNGwR/SvuAehpJ0Q2iP+uG0d88N/CRZ75Vh9F1YuLajbD4sG33dnxTMlF2F AFFhDNcwumL7gozHKtTnjHARFott946yCwMiuLij/T2BRcnwlRy1iXJnhnuJcPPNkjyi qhZw8zFRyyWes5eJ8gyY569pxrVa6Pf6pkQKKX1rKho/12iixDOVHaLKMaXFdexVTBrH I/Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=LuL3GNYcrO1zmZoplDukH9M4RIQtyGS3DtUs8zebHlI=; b=nNrfgoLEfPtP4evqlS/cB6ecYeETtE4QFVgOpAhZUR67lWsmKWxrC6/ca+eBuZAeyr q6TX3kS98t/00Mbv8/X6Ski6C+TkjrAjsmMf4xSpO3HR7f4pkSBYM2fdUkEikb1aRCgo xMw6FE6961pp5/+s3mrLZmu82N4e/N6zVR5mXvEHwR3l73tHmuM967ISLqBjGmXp68Ml ddq1AOqbTkTtOJkkFVLq+eMVMLJgaOceX0vHVqHFYTPi34xNWtTObO9ORUQvWoPiv87E LMifU6nZuJEuStY1Y05Jxg+rNszBEByMoM6Idlg418llG2BYxsxvudnJDjwYadBCNU+i YRSA== X-Gm-Message-State: AOAM533K7J6mYYs6NiBxgd4scrZtOqdp2710L5qOs8tfHXjOog5Gtm1b Un1K+hLc/9OY4qcJJF/OdZgea88FTtMe+w== X-Google-Smtp-Source: ABdhPJymESwyyRWSvUui1OxST0ORKuO+PjKgUZL/1PWOLgePuO31xGykh6u3gaAEeOJzbb05xKMLQw== X-Received: by 2002:aed:26c2:: with SMTP id q60mr19251004qtd.206.1592290764638; Mon, 15 Jun 2020 23:59:24 -0700 (PDT) Received: from ?IPv6:2601:c0:c680:5cc0:d0e5:8b54:d40:a778? ([2601:c0:c680:5cc0:d0e5:8b54:d40:a778]) by smtp.gmail.com with ESMTPSA id e1sm13760356qto.51.2020.06.15.23.59.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2020 23:59:23 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Message-ID: <9D1E1E08-7DD5-4FD3-B08E-58254CC75FC5@newclarity.net> Date: Tue, 16 Jun 2020 02:59:22 -0400 To: PHP internals X-Mailer: Apple Mail (2.3445.104.11) Subject: Remove LSP checks on static methods? From: mike@newclarity.net (Mike Schinkel) Hi internals, Given that there appears to be some appetite to reduce checks for = inappropriate signatures[1] I am wondering if anyone has strong opinions = =E2=80=94 pro or con =E2=80=94 on removing checks for static methods? My primary use-case where I would like to see checked relaxed is for = static methods used as factory methods[2]. Per [3] it seems that all but the least upvoted answer argues that LSP = applies to instances, not static methods.=20 Per [4] it seems that all upvoted answers agree that constructors should = not be constrained by LSP, and since a factory method is a form of a = constructor it would seem that if constructors do not require LSP then = factory methods would not either. Does anyone see any issues with relaxing these checks for static methods = that would have them downvote an RFC on the topic? Thank you in advance. -Mike [1] https://wiki.php.net/rfc/inheritance_private_methods [2] = https://en.wikipedia.org/wiki/Factory_method_pattern#:~:text=3DThe%20Facto= ry%20Method%20design%20pattern%20is%20used%20by%20first%20defining,of%20ob= jects%20the%20parent%20contains. [3] = https://softwareengineering.stackexchange.com/questions/101102/are-static-= classes-with-static-methods-considered-solid [4] = https://stackoverflow.com/questions/5490824/should-constructors-comply-wit= h-the-liskov-substitution-principle=