Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119421 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72430 invoked from network); 24 Jan 2023 17:58:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Jan 2023 17:58:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8F4F01804BE for ; Tue, 24 Jan 2023 09:58:18 -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,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 24 Jan 2023 09:58:18 -0800 (PST) Received: by mail-vs1-f45.google.com with SMTP id k4so17295950vsc.4 for ; Tue, 24 Jan 2023 09:58:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hGveqTWNwqqRQUruWzMUlgmn/Mjx6N6Dk+cXeBXs+pc=; b=Vk0VhY/5+M6Htyjltns08lkT71+Z+jTAWKgpmCApJpkREweHow0tDwuiw9I+Fk05oV HiAumyAEQdHwYGe1Bh4z+pr2TBtXZvjoI0Pf+wEgiN/18Y5Lo/1VxCayDA3OpVTExcaO w2YMTBNXuGsQIbuR9Na9eKWdXxNLnpp0HJdGkJh4Xipvl2QG/0KxIRHI1K7/YOBC3Zlc +qpWRJ4NhifksStDQL56gHrq04b9ns2V64v0GD8jH1TRMENwY+Bzb6Rljo5qEbhWULJg SRvZsc8DqiUakJ7fNCDQTW/OdQ0JReKmbTFBzHeriosHr0DZXwq9G2/1xvFkyos8F0hM YHvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=hGveqTWNwqqRQUruWzMUlgmn/Mjx6N6Dk+cXeBXs+pc=; b=AYo/vehEX2YcQljFRtcDhuS9kHoYlHhOLdLSjAL9iADIL4jLyC+G6txUQLboe32AWu JZNDZ3fh+yIcBJEb+aYfJ0YpZjA9Pf5RhjNNMRvVzSF6T0ow+YqNzfPtQMYILDUBrTI1 Jf+QpzLNhmqSRSolkD5ixsCygGbLGHLeQkL+8jncE931uny6OqOMjY4B/iPqH9iXxKup Qjh09qqry1no9qorJ2m4sT0E68BLtIdZqPItCSmVf6kEBpfMCku7KvRYSm5iXo21cL8J iPCOQiAsHik9RfcHLyQhnaVUJcQ+WS1UxevX6spV/9RDUcJQSBA02kYL+5chMDEOcksd /dbA== X-Gm-Message-State: AFqh2kr5WsfkU3nkOMJ58lfT7w+p0Izg+th7k5uOiI1smjD1W+n6pT0K 4jZAzSvt3dP7b8nX3eLy7mGTkk+bY1RsAhcGbKk= X-Google-Smtp-Source: AMrXdXvbfpdf4nIebtUHXED9ebheAlWipNnY7A7Up128AgeiNqzbVLUGWoltdSdpdyGTZrQjBz1b/tJXCyqgzmAbY6c= X-Received: by 2002:a05:6102:66d:b0:3c5:8e05:543e with SMTP id z13-20020a056102066d00b003c58e05543emr4046252vsf.69.1674583097576; Tue, 24 Jan 2023 09:58:17 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 24 Jan 2023 14:58:05 -0300 Message-ID: To: "Matthew Weier O'Phinney" Cc: Robert Landers , =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000ad926705f30642f6" Subject: Re: [PHP-DEV] [RFC] [Vote] Readonly amendments From: deleugyn@gmail.com (Deleu) --000000000000ad926705f30642f6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > > > Mocking > > > > This isn't a terribly compelling argument. Readonly classes are typically > value objects; it's rare that you will mock them as they will be used as > messages or results, and you'll end up doing assertions against them =E2= =80=94 not > mocking them. > > Anything else it would enable? If like me you have a lot of service-style classes with recursive autowired DI, making them all readonly is a no-brainer and mocking some of them sometimes make sense. I have no opinion in favor or against, but wanted to point out that to me value objects are less likely to be readonly than service classes, where mocking are common. --000000000000ad926705f30642f6--