Re: [PECL-DEV] Introduction & First PHP Extension – Bringing Design by Contract (DbC) to PHP
[email protected] (Yehuda Katz) Wed, 19 Mar 2025 17:24:08 -0400
| Newsgroups | php.pecl.dev |
|---|---|
| Message-ID | <CAGBAQ47mZM13azvwaRohDJEQNmsJkW2+FMRRyYejDJfTQOZsyQ@mail.gmail.com> |
--00000000000016742d0630b8a5e5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This looks really interesting. Does it make sure that there is not a loop by calling another class method from inside the invariant check? - Y Sent from a device with a very small keyboard and hyperactive autocorrect. On Wed, Mar 19, 2025, 4:58=E2=80=AFPM Andrea M <[email protected]>= wrote: > Hi everyone, > > I started my journey as a LAMP developer back in 2004, working with PHP 4 > and MySQL 3. For years, PHP was my daily driver, but toward the end of > 2011, I transitioned to JavaScript, gradually writing less and less > PHP=E2=80=94until it became just an occasional tool in my stack. > > That changed with *beyond-tabs.com <http://beyond-tabs.com>*. Through > this project, I found myself re-embracing PHP, and, thanks to this > community, I also discovered *Design by Contract (DbC)*=E2=80=94a paradig= m that > immediately resonated with me. Now, I want to take the next step and auth= or > my very first PHP extension: *Invariant PHP > <https://github.com/andreamancuso/invariant-php>*, bringing DbC > principles to the language. > > Beyond just being an extension, I see this as a *proof of concept*=E2=80= =94a way > to demonstrate the value of DbC in PHP and potentially spark a conversati= on > about native support in future PHP versions. I=E2=80=99m eager to learn f= rom this > group, get feedback, and hopefully contribute something meaningful to the > ecosystem. > > Looking forward to your guidance and insights! > > Best, > Andrea > --00000000000016742d0630b8a5e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div>This looks really interesting. Does it make sure tha= t there is not a loop by calling another class method from inside the invar= iant check?=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">- Y</d= iv><div><br></div><div data-smartmail=3D"gmail_signature">Sent from a devic= e with a very small keyboard and hyperactive autocorrect.</div></div><br><d= iv class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gm= ail_attr">On Wed, Mar 19, 2025, 4:58=E2=80=AFPM Andrea M <<a href=3D"mai= lto:[email protected]">[email protected]</a>> wrote:<b= r></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex= ;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"> <p>Hi everyone,</p> <p>I started my journey as a LAMP developer back in 2004, working with PHP = 4 and MySQL 3. For years, PHP was my daily driver, but toward the end of 20= 11, I transitioned to JavaScript, gradually writing less and less PHP=E2=80= =94until it became just an occasional tool in my stack.</p> <p>That changed with <strong><a href=3D"http://beyond-tabs.com" target=3D"_= blank" rel=3D"noreferrer">beyond-tabs.com</a></strong>. Through this projec= t, I found myself re-embracing PHP, and, thanks to this community, I also d= iscovered <strong>Design by Contract (DbC)</strong>=E2=80=94a paradigm that= immediately resonated with me. Now, I want to take the next step and autho= r my very first PHP extension: <strong><a href=3D"https://github.com/andrea= mancuso/invariant-php" target=3D"_blank" rel=3D"noreferrer">Invariant PHP</= a></strong>, bringing DbC principles to the language.</p> <p>Beyond just being an extension, I see this as a <strong>proof of concept= </strong>=E2=80=94a way to demonstrate the value of DbC in PHP and potentia= lly spark a conversation about native support in future PHP versions. I=E2= =80=99m eager to learn from this group, get feedback, and hopefully contrib= ute something meaningful to the ecosystem.</p> <p>Looking forward to your guidance and insights!</p> <p>Best,<br> Andrea</p> </div> </blockquote></div> --00000000000016742d0630b8a5e5--