Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108455 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 74326 invoked from network); 11 Feb 2020 12:00:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Feb 2020 12:00:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E6A79180210 for ; Tue, 11 Feb 2020 02:14:43 -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 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-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 ; Tue, 11 Feb 2020 02:14:42 -0800 (PST) Received: by mail-lj1-f174.google.com with SMTP id x7so10915558ljc.1 for ; Tue, 11 Feb 2020 02:14:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Kd1kH0bWpzzoVzAlu+UzxiVvzx8L/JGXH6QpVonm4Zc=; b=g1wFUBWZijw/SCR7xcegkuq/z1yqk1UErbFyoF+wxxH9rq0XYrKOq/B29T9xKdFbuw rvW0YN6q4dbWmrGIPKQPd4+2wOLPtZuCfsCAECpoW+2M49diG9uLOyt7Ea6KlD2SUb0q H6NOLqMR6mLDmXqQNikYMP9XwvoQnT2gd/PqotKXEdz4dW4wm5mBIPziNPnPWiGoXOxi /XekZr1dEZbxJDVXlz+SE9OSn6GWpNm9obYoPTPC0JKVc7d27W+YdsmGNkTHn4O/tq8j nAddvmEPaEYLzJIe5Bm2EmozeYOXpeCRpUVyjwUlLB1xkARwvmyjuyYL0R1T7sUc1zDL LhdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Kd1kH0bWpzzoVzAlu+UzxiVvzx8L/JGXH6QpVonm4Zc=; b=WlLo5yphGnCG1JvDSfNH49jBmQi2qgVmiAxJmCqcUmxHhaF+TMwkDbby9QRl+/54MG +YbBlQVfK6wPx+MGGtBP1AvwMeVnL96ihoJ3P7zYC+RQkhrY4mqOC2yQOLWRg9UxWvbF 7AD+dYJWjSDhRi8fjWxyagYyP1glOprj1+B4Av89jYKm6nsp5SSUZjo8Wa8+Ccr/b6fc XuPm1+JVBz83HKz/jt8UCxHyuMiOEKZ+Aa6TY8h0kotoaIZyfoHMmSJTcM8GHHMpd3Oy hSb7GBS6ylEbmDZh1fcJY39xzmkFyH13TNddcf2Hk2vSzji9k/Pi0WZOf5Pga0NCIraM 4DXg== X-Gm-Message-State: APjAAAXfKX3sdVkLuNDLWJ3EGU8t6LsT/rIyvBo5dZaQdsUKeGF2Ms/c st1j4DY/BR92hfqK/63QP5/3YsnZrhKgPqeAC1GcbzPRtFU= X-Google-Smtp-Source: APXvYqwQ5N8a1cOofnYhZeFa/mkvSV10lXhwEJ0vZ6uFsmOBZoDzC66xJrokK74ajFJyyCFm3/iHzlPvb3AzGBndtGo= X-Received: by 2002:a2e:a408:: with SMTP id p8mr3884856ljn.145.1581416079093; Tue, 11 Feb 2020 02:14:39 -0800 (PST) MIME-Version: 1.0 Date: Tue, 11 Feb 2020 11:14:23 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000a2f2c6059e4a1f57" Subject: [Pre-RFC] Support for decorator patterns From: nikita.ppv@gmail.com (Nikita Popov) --000000000000a2f2c6059e4a1f57 Content-Type: text/plain; charset="UTF-8" Hi internals, I'd like to get some feedback on the idea implemented in https://github.com/php/php-src/pull/5168. It provides an easy way to implement decorates, by taking care of forwarding any methods you do not want to override in a type-safe way. See the PR description for details. I've been playing with this thought for a while, and decided to try this out now, because typed properties in PHP 7.4 offer a very nice syntax choice for this feature. Any initial thoughts? Regards, Nikita --000000000000a2f2c6059e4a1f57--