Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127425 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 874891A00BC for ; Thu, 22 May 2025 11:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1747912031; bh=ykoR9r49IxlzMFhhyGxOn76s4+16dMcXm2/yvjjWZ/M=; h=References:In-Reply-To:From:Date:Subject:To:From; b=JHK6eR1ZJNSiuQ1LB/aNrcyHJv0otRvKhwu/tH0YapOCf9VG4wGAlpivU6okvm/R0 NizwDHkQgPkiuIXbeiJL4in56fMLkV0/ZmXdljn1IVwbuNTo91LgkGA/JkBPa48dvo Rmpfq4ZfgzrTpWiPF83Z0sI/OqwyX6Gu9rYZrlgjiP17zBbw27OSC4Y+tyoPeB83Ek YU5MNoAFJqweGfWZkX3YHlf5WbfEL46JDwDEFliH/9T3mHsp6VdolDDjGzvOLOjq/h P9364WRHfy86U/5LYHcQcYws/2dneOtehqyLFOOPhMWukXPNGzsu0DNlrV3KCk19HG +mCd+iOXDSY4Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 27A97180053 for ; Thu, 22 May 2025 11:07:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 22 May 2025 11:07:10 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-7c560c55bc1so769829685a.1 for ; Thu, 22 May 2025 04:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747912157; x=1748516957; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=ykoR9r49IxlzMFhhyGxOn76s4+16dMcXm2/yvjjWZ/M=; b=Gv9EdC/tJnumExp0zqFmtnoXVhh/GU8iT3etY4CnBQ3GQZjOIsUwqWhSNbs8WyFjPP ebxpXrsuT4KJwmxj9UK0qzsKr0KR+dZP5fcc50v7n86GmHDtA+I7NC80fRnVzxUzmE6J lFZs9rb1eJX+pdxctFiUIsuDf6dvOey2GzEORAL8XAiMZbJHL6QyB9tJTyf1BiUrjzQ4 mJSF1TMMuJgxFwTsrRGpkdGzYzorQ4BwaLXvxwxxxqb5hzxhIT2rX68t/PQKqhFVD8CX x4zSoPvkx5WzUb5jQhJPjR/rAKbQS1Fg5kr9foieEWI4uRxTLtATOvzJPzC2RrSG1V72 +Rlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747912157; x=1748516957; h=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=ykoR9r49IxlzMFhhyGxOn76s4+16dMcXm2/yvjjWZ/M=; b=vyTviNUNboYi1fg/PYQk/XSP5/PcBtXIbXCmYUgHAaKhK/yyW1OmjV5LQVoPJw3ufY jBHPizozeBfFbuaP6Tfb2p2rJZOD4LCTCqxa9B4QktuZV3onJ6WBpwpLb49yCOU0k0IR MVKYhLsPmuqO+YNyQCjQPF2uNyASAQOsHivsmRwxO17ydieltsC/GW50gTjVfMBHldyD wTMGy68+BSHyXHPSqbt1MWIdH+zKkcphWowisXKO97Xis2NNjOdPgziS3+MIx7atVnIi F4R0xm/Zf/v8vBEU/L3esanlYdhRFcQFveqhHAE/6vy6IEG0bul9kP+3lpFi4fQad4P6 fN3w== X-Gm-Message-State: AOJu0Yx8OCIaOyx/pSwBRtpGhBirD7IOW86NRii+JY2GlNzISSjaFtKF 897nCVhPsQ/qC5DOrQML8oOc7elQhwOnpIdYyAaZ8oDzkCL710eJnRWo/NZgjhzAg+EIbj+SSCQ fTcn7JFOMrXQwEi0q0V5z2y9fgLdhBIao1CE9 X-Gm-Gg: ASbGnctT3LsBwWWnrQtPqPosSqlAwfG3p0PtKJdIk4ACOBa3puwontzUS3qVS8jfBUs hj1sRH5Wcux6yXEO6Cy+U6wni4XZvNptj2jyALAUUd8W0rsHFjnMV2ftbx9USJfm3LVLMejRzyG 2G3Z2Tua9AuCxT9Et/sYVsZ23Dxpzln+HwR30HG2KYdOCERAAqDTTYKOxW6gK8ig== X-Google-Smtp-Source: AGHT+IHbs88XTmkMAHykX7DsZWXv8SpIGJvoC6eWIcO5GR1XRXtrqdNzQYGX2tRu0/6OBzVT/TImeITmZ/3ihrt+fgE= X-Received: by 2002:ad4:5f08:0:b0:6e8:f166:b19c with SMTP id 6a1803df08f44-6f8b08ee744mr332004896d6.41.1747912157265; Thu, 22 May 2025 04:09:17 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <3ae9a6ea-f135-472b-b2bf-e6cd6ebad299@app.fastmail.com> <9A26F72B-D0EF-414F-B193-BED3CAB26A0B@rwec.co.uk> <9f6a0d6e-27c3-4f77-aed6-e55147442b6f@app.fastmail.com> <673fd2db-b07f-439b-a4f2-e9519108d159@app.fastmail.com> <78641D8B-AF1D-4912-920A-D75A37C32F05@rwec.co.uk> In-Reply-To: Date: Thu, 22 May 2025 07:09:05 -0400 X-Gm-Features: AX0GCFuLB3tEhiRe7NDKX5nUyfn00PdkwHUrx8AQ0zGmXzUhX1oFmwKcNcyNotQ Message-ID: Subject: Re: [PHP-DEV] Module or Class Visibility, Season 2 To: PHP internals Content-Type: multipart/alternative; boundary="0000000000003b84b80635b783e9" From: tendoaki@gmail.com (Michael Morris) --0000000000003b84b80635b783e9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 21, 2025 at 8:27=E2=80=AFAM Rowan Tommins [IMSoP] wrote: > > So if we can come up with a solution where only the WordPress plugins nee= d > to be changed, and you can use whatever dependencies you want without > waiting for them to be changed to a new way of working, is that not a goo= d > thing? Yes, and that's all I think is needed here. I could modify plugin code if I needed to. The majority of developers capable of doing this have left WordPress in disgust - I did too, but I needed the work. Since I have to work with it I'd like to make it more sane. One major step in that direction is the Timber library which bridges WP to Twig and gets rid of that god damned loop architecture they think is the bees knees but in reality is an antipattern and untestable spaghetti nightmare. > I've tried several times to explain why I think Linux containers are a > good analogy; I'm not sure if you didn't understand, or just didn't agree= , > so I don't know what else I can say. > I have no disagreement with that, but it's an implementation detail. I'm not there yet - I'm just trying to describe what I think is needed from outside the engine. > Looking closely, I see I did make one honest mistake: in your example, th= e > WordPress plugins are A and B, not B and C. So my sentence should have re= ad > "A and B are one kind of thing, but D is a different kind of thing". That's what set me off the most and I over-reacted. To you and to the list at large, I apologize. I'm just frustrated - I feel like a five year old trying to explain a problem to a physicist. On Wed, May 21, 2025 at 6:09=E2=80=AFPM Hammed Ajao w= rote: > > Anyone familiar with C++'s friend keyword? It=E2=80=99s not a direct repl= acement > for modules, but it solves similar problems =E2=80=94 allowing trusted cl= asses or > functions to access private/protected members without making them public. > > Friend has been brought up before and I believe it was in at least one RFC before and voted down. That doesn't mean the issue can't be revisited, but look into the archive and see if my memory is right and if so why was it voted down before? IIRC it's tied to the fact PHP doesn't have a notion of namespace level visibility. Classes and functions outside of classes must be public in the current architecture. --0000000000003b84b80635b783e9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, May 21,= 2025 at 8:27=E2=80=AFAM Rowan Tommins [IMSoP] <imsop.php@rwec.co.uk> wrote:

So if we can come up with a solution where only the WordPress plugins need = to be changed, and you can use whatever dependencies you want without waiti= ng for them to be changed to a new way of working, is that not a good thing= ?

Yes, and that's all I think is needed= here. I could modify plugin code if I needed to. The majority of developer= s capable of doing this have left WordPress in disgust - I did too, but I n= eeded the work. Since I have to work with it I'd like to make it more s= ane. One major step in that direction is the Timber library which bridges W= P to Twig and gets rid of that god damned loop architecture they think is t= he bees knees but in reality is an antipattern and untestable spaghetti nig= htmare.


I've tried several times to explain why I think Linux containers are a = good analogy; I'm not sure if you didn't understand, or just didn&#= 39;t agree, so I don't know what else I can say.
<= br>
I have no disagreement with that, but it's an implementat= ion detail. I'm not there yet - I'm just trying to describe what I = think is needed from outside the engine.
=C2=A0
Looking closely, I see I did make one= honest mistake: in your example, the WordPress plugins are A and B, not B = and C. So my sentence should have read "A and B are one kind of thing,= but D is a different kind of thing".

= That's what set me off the most and I over-reacted. To you and to the l= ist at large, I apologize. I'm just frustrated - I feel like a five yea= r old trying to explain a problem to a physicist.=C2=A0



On Wed,= May 21, 2025 at 6:09=E2=80=AFPM Hammed Ajao <hamiegold@gmail.com> wrote:

Anyone familiar with C++'s friend keyw= ord? It=E2=80=99s not a direct replacement for modules, but it solves simil= ar problems =E2=80=94 allowing trusted classes or functions to access priva= te/protected members without making them public.

Friend has been brought up be= fore and I believe it was in at least one RFC before and voted down. That d= oesn't mean the issue can't be revisited, but look into the archive= and see if my memory is right and if so why was it voted down before? IIRC= it's tied to the fact PHP doesn't have a notion of namespace level= visibility. Classes and functions outside of classes must be public in the= current architecture.

--0000000000003b84b80635b783e9--