Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116392 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30800 invoked from network); 15 Nov 2021 19:45:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Nov 2021 19:45:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E44F5180545 for ; Mon, 15 Nov 2021 12:40:12 -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-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) (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 Nov 2021 12:40:12 -0800 (PST) Received: by mail-ua1-f41.google.com with SMTP id t13so37605457uad.9 for ; Mon, 15 Nov 2021 12:40:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3zjKPUWAt6SPaXkP1JOqn2OgDdKJfe+a290QVun5BbY=; b=S5Rrmtfag5OPU0sRRUvUKnYxBYmKT9C9S0QjrQoj5/DWYvnUAI6kKCjov/FO02+SQA SnW3Lnc136W2bwHfsukCu240X+NzEgsjL5WkjrL9vhntHlcgWQTQ/r3ZI9YI9oAAE5EL OtCFJ9WfycZmesEgjTMfI3NkR3TFM+Hdi7j6YiXgrlOKM/oJIWsR+TDhEHMWxn+cwl5h NAu8viOlpHXwaKBh3jsHOGoJdihHdWZD42iAiIlTp8NRgelrzFJACX4DxcboBrCTx8xo zRhZqg8Bk0fU853cROAuRfkOSAik9MZ4rKBj1+g4VziV5pquZGNwtC9/stfUu/G6iTZn RT2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3zjKPUWAt6SPaXkP1JOqn2OgDdKJfe+a290QVun5BbY=; b=DWIY0XTv8AIrBBaHRr8T4dIf7zVr6tGlHAxkLp6L5GN2ghz3BoRIsu7k7RyOyO2jU7 tnTrI1vK7Xy9ehl7XV87MVsp5b091SJRNCY8oGdiegFqDoZ0Q9GWJc2oXg/nL3fOunTU UmwZnZmB5lzPOYeeJBuxYyvUIBQEQ+NGKZ39cPKhPKPUNli9I68ToMrbZ1F+H8Lf3RhH BqRx4CUI6OCc4kwkk2vQ9/KcNlqY6cj0mE1uMxdr8tp2P2JpNPakWzLvTi7AdPq+O6Lt NvSAvhGDVycq7ByKnfU9je+CdMwEnxFuKnSsJoH//3KnIiWVBWwSxsVXXYl2S25NyMKx PpDw== X-Gm-Message-State: AOAM531fDiOfuYlP+IYNIhPS0rRWHXfk/RySfHrGzeGN6egFXtUvjivv +adfCD67kdDoHPH5/33xLw/oolDsNxHSuWSn2ys57GUWgiE= X-Google-Smtp-Source: ABdhPJwCD1W4V2KzvUnn/K6RyJDyuqwNgC3Fy17bZNIsByRCegAjbHbpZFvRA7Yrz+ZZ29PlHs1KbMQArSeXp/e5cb0= X-Received: by 2002:a05:6102:242f:: with SMTP id l15mr47254903vsi.11.1637008811774; Mon, 15 Nov 2021 12:40:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 15 Nov 2021 15:39:59 -0500 Message-ID: To: Deleu Cc: James Gilliland , Derick Rethans , PHP internals , Nikita Popov Content-Type: multipart/alternative; boundary="000000000000b8567405d0d9d061" Subject: Re: [PHP-DEV] Re: [RFC] Deprecate dynamic properties From: chasepeeler@gmail.com (Chase Peeler) --000000000000b8567405d0d9d061 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 15, 2021 at 3:11 PM Deleu wrote: > By design my REST API utilizes dynamic properties. I've always found it t= o >> be a feature of PHP, not a bug. >> >> -- >> Chase Peeler >> chasepeeler@gmail.com >> > > I am in the unfortunate position of inheriting a system with such REST AP= I > design. I can never build new REST APIs to replace the old ones because > nobody can ever know how many combinations of possible input parameters > there are. > > Our inputs and outputs are both well defined. I've built a framework around our entities that convert them into API payloads - attributes (symfony, but eventually we might update it to use native attributes) define what fields are visible based on user and whether it's the short (e.g. part of a collection) or full version. The thing is that occasionally we'll have a payload to return that requires additional attributes. Dynamic properties allow us to just tack that on to the existing entity without having to define it as a property on the entity (outside of the one use case the property isn't needed and it definitely doesn't correspond to a database column). > -- > Marco Aur=C3=A9lio Deleu > --=20 Chase Peeler chasepeeler@gmail.com --000000000000b8567405d0d9d061--