Scott Keck-Warren
0:05
Hello developers, and welcome to the PHP Architect Community Corner, where we have conversations with members of the web development community. I'm your host, Scott Kachorn, and today we're talking with Daniel Scherzer about his work as the release manager of PHP 8.5, as well as contributing code to PHP. Daniel Scherzer has been writing code for over a decade and is currently serving as one of the release managers for PHP 8.5. Check out his work at scherzer.dev. Daniel Scherzer has been writing code for over a decade and is currently serving as one of the release managers for PHP 8.5. Check out his work at scherzer.dev. Thank you, Daniel, for finding some time to talk to us today.
Thanks for having me. It's a pleasure to be here.
Scott Keck-Warren
0:41
Yeah, absolutely. Absolutely. So, so you, um, you are one of the release managers for PHP 8.5. Can, can you talk to us a little bit about how you got into, uh, PHP and, and what it is, what it means to you?
So in my day job, I write code using PHP, and I also did while I was getting my degree, and I found that I like to code. And so I started looking into, you know, where PHP is implemented. Unlike C or C++ are the examples that come to mind, there isn't a specification of here is what the expected behavior is. It's just, here is an implementation of the language. And I saw that, oh, it's just on GitHub and anyone can contribute to it. So I started contributing and I enjoy writing code. It's why I am working in computer, in the software field. It's what I do for fun. And so I saw that, oh, here's a project I can contribute to. And I enjoyed contributing to, and I guess the rest is history. I, I've been sending, you know, pull requests for features, for small features and bug fixes and RFC requests for comment, um, for larger features.
Scott Keck-Warren
2:06
That's really fascinating. So like, so how does that like work as, um, how does that work out for you? So like, is it, is that something like, I know that like there's, there's obviously like for bug things, they're probably just like, if you can fix it, like, please go and do it. But how, how does that work for, you know, I have an idea for a bigger feature or somebody has an idea for a bigger feature. Like, how is it that you get that actually into the source code? Like, what is the process?
So the process for the larger to largest changes is going through RFCs, which stands for requests for comment. This is what is used in other contexts outside of PHP. It's how a lot of the specifications for, you know, the internet infrastructure are defined, SMTP and HTTP protocols. And so the way the PHP community does it is you write up, here's what I would like to Here's what I'd like to change, generally accompanied with, by an implementation. Apparently it's part, not officially required. Like you don't have to have an implementation ready when you propose it, but it does make things easier when you can say, here is exactly how that edge case will be handled. You then spend 2 weeks, at least 2 weeks discussing it on the internals mailing list. Not Wikipedia, sorry. MediaWiki is what I use for work, and Wikipedia also has RFCs. The PHP community uses an internal mailing list. They use a couple, but the one that is dedicated to discussing the internals of the PHP implementation is called Internals. Uh, and there's an interface to read it at externals.io for those who are curious. And you just, you start a thread there saying, here is my RFC and what do people think? You get responses, everything from this sounds great to I don't like this to, uh, okay, I don't really care. Like, not, you don't have to respond and it's a pretty big mailing list. So I'm assuming the vast majority of people aren't responding to every thread. And after at least 2 weeks, uh, more if there is a disagreement or if you need to change the RFC to incorporate feedback, you can put it to a vote. And if it gets at least a 2/3 majority, then in, from a specification point of view, I guess it has been accepted. And separate from that, the actual implementation still goes through code review and whatnot. And then it gets merged on GitHub like any other request, like any other pull request.
Scott Keck-Warren
5:11
Yeah, that's, and so then like, cause that, that like, that's one of the more, um, interesting pieces I think of like the language is because it is an open source language and it is being like developed in open, an open manner is like, it is very easy to just go in there and see exactly what it is that people are working on. Um, I think it's like, I know that like the pipe operator is like the big new feature in PHP 8.5. And like, so people have been talking about that for like months, 'cause like it's coming and it's, you know, we're, it's going to be here and it's going to make everything better. Um, and so it was like, is, is there some sort of, um, how does that work out? Like, is it, is it a good environment to just kind of come in and say, hey, I have an idea and, and then be able to work on it? Or is, or is there some, you know, is there some harshness to it in order to get kind of going on all that?
It depends on your background. I have to say, I have seen some feature requests on GitHub that are large enough that they do require an RFC, and then the original requester doesn't even contact the mailing list because that's a higher barrier than just filing a request on GitHub. I've also seen that people on a mailing list can bring up edge cases that you might not have thought of. And so there is a benefit to that discussion. GitHub's interface for within the issues that are filed is not the most conducive to threaded conversations. I don't necessarily know that email is the most conducive format for that either, but it does seem slightly more, slightly more helpful when you can reply in a thread and you can say, here is who I am replying to, and you can have a discussion. I will say that I have the benefit of being a native English speaker, and not everyone in the world and not everyone who contributes to PHP is a native English speaker. As far as I can tell, the discussions, the mailing lists are almost exclusively in English and code is generally written in English. So I had a slightly lower barrier to entry than other developers might, but I'm— The process of going through the discussion on the mailing list is very helpful. And it can be especially helpful if you start that discussion before you spend your time writing the code to see, oh, this just has no support.
Scott Keck-Warren
7:50
Yeah, I know. I saw, I've seen like multiple issues where like, um, I, so I don't follow, I follow like the RFC process. I don't usually follow like the externals, the internals emailing list, 'cause it's just too much for me to try to keep up with. Um, but I always do see like, this is version like 5 of our attempt to do this thing or version, like, I think like the clone, the clone change that is coming in 8.5 is like version 2 or 3, because like the first couple ones didn't make it through the voting process. So I can imagine it would be very frustrating to like do something, have the code running, and then just be like, eh, we don't want to do this. So, because I—
Yes, I, so I, in the 8.5 cycle that I, there were 6, I believe, RFCs that I was the primary author and driver behind, separate from the mass RFC for 8.5 deprecations. Uh, I believe I wrote— let me actually check this before I just keep spouting. Um, I believe I wrote 6, and of those, 5 passed and 1 failed fairly spectacularly. Um, I think, I think the final vote was like 3 votes in favor and a whole bunch against. So if I had Um, if I had gotten some kind of feedback before I spent the time writing that implementation, it might've saved me the headache. On the other hand, the internals mailing list is not only, is not reserved for people who can vote on your RFCs. So. it can, the feedback you get there is not necessarily reflective of the voting electorate. Yeah. So yes, I checked and I have 5 RFCs that I wrote and that passed from a pretty small one to allow promoted properties with final properties, uh, to a much more involved one about adding attributes to compile-time constants. And, and I, the feedback from the internal mailing list on both of them, from what I recall, was, was very helpful.
Scott Keck-Warren
10:18
Yeah, I think like those are 2 of the ones that like, I usually try to do like a list of like my favorites and like both the attributes on constants and the deprecated 'Cause you have the deprecated for traits as well.
Scott Keck-Warren
10:30
Um, and like that deprecated attribute concept has been very, very helpful in like, like in my day, in my day job to be able to go like, well, this, you just shouldn't use this function anymore. We have a better version of it. Um, and then like later come on around and clean it up. So, so we don't have to like spend, you know, an entire cycle, like rewriting all of the code that's supposed to call that function. Um, and it's nice to have that like built into the language and especially now on traits where I can say, well, this is a bad trait. Don't use this trait anymore. 'Cause we, we have that situation at work where there's, There's a trait and it's used on some things, but we don't want to use it for anything new. Um, and people keep using it, which is a real, real mess.
Um, so that was also kind of the driver behind my delayed target validation, uh, RFC. So prior to 8.4, you could add deprecated wherever you wanted because it wasn't provided by the compiler. Like it wasn't built in. And you would only get errors at runtime if you tried to instantiate that attribute and it didn't exist or it had the wrong targets. But in 8.4, the deprecated attribute was added to, was built into PHP. And from what I recall, it only supported class constants, class methods, and global functions. Which means that if you were trying to use it to annotate, oh, this class is deprecated, that was suddenly a compile-time warning, compile-time error, excuse me. And so even if, you know, in, in 8.7 or whatever, it was going to be possible to add a deprecated attribute to a class, the fact that it was a compile-time error and your code just wouldn't compile. trying to use it ahead of time meant that if you wanted to be able to annotate your class with the latest attribute, you would need to either be running 8.3 or below when it wasn't built in, or running 8.7 and above, or whatever version added that. And this was in a sharp contrast to the, the way the attribute system was built up, which was the syntax was essentially backwards compatible as comments. So you could have, as long as you weren't putting the attribute on the same line as any code, you could run the same code on PHP 8 and PHP 7.4, and on 7.4, the attribute would just be treated as a comment. And for attributes that aren't provided by PHP, that aren't built in, you don't get an error about them not existing or not having the right target or not having the right parameters until you try and instantiate them at runtime with reflection. So we have all of this, oh, it's so great, it's so backwards compatible. You don't have to worry, you can add an attribute even if it doesn't exist. And then, oh, the deprecated attribute cannot be used on a whole bunch of things. So I have a longer-term goal of adding support for deprecating interfaces and classes and properties, but the, to unblock, I'll, if that is implemented in, let's say, 8.7, to allow developers to apply that attribute without the compile-time error. necessitates adding some support for that in a previous version of PHP, which is what I did with the delayed target validation RFC.
Scott Keck-Warren
14:17
Hmm.
Scott Keck-Warren
14:19
I think like, yeah, I, I think attributes are this really cool, like we're like, we, we don't do much with them. They're a really cool, like functionality within the language. I really am like a fan of, of like using them to, to decorate things, especially since like it takes over a lot of like stuff that DocBlock used to do. You know what I mean? Um, I think like, I'm always amazed whenever I talk to somebody who's like one of the maintainers and like, just like the amount of details you all have to keep in your mind about like how that, that, that whole like explanation that you just had. I was just like, that's a lot of information right there. It must be really hard to like keep all of this stuff going in your head.
I guess, I mean, I've been looking at attributes for probably a year. So in my work, I work with MediaWiki, which is the platform that powers Wikipedia. And for the longest time, they were still running, their code was still 7.4 PHP. So I had roughly zero exposure to attributes before maybe a year and a half ago. Um, when it was, when 8.4 was was in development and 8.3 had been released. And I thought they were cool. And I gave a talk at a MediaWiki conference about the deprecated attribute, in part about the deprecated attribute and how you can use that to signal from MediaWiki to signal to MediaWiki extensions of, hey, this functionality is deprecated. I said, one of the drawbacks is can be used on class constants, but not global constants. And so I set about, let's see if I, if I can implement deprecated attributes for global constants. And that's really how I got more involved was I was poking around in a lot of the code as I was working on that. It necessitated changes in everything from the grammar. to how parameters to opcodes were passed from the compilation step to the runtime, because class properties, classes, functions, those all exist at compile time. There, that function exists as soon as the file is parsed, but for global constants, Even the compile-time constants, those declared with const example equals foo rather than define example equals foo, they don't exist until runtime. I have an example of this in my blog post where if you have a PHP file that the first thing it does is return, and then after that it defines a class, that class will get defined if you include the file. And the same if you have a return and then it defines a function. But if you return and then define a constant, that constant doesn't exist at compile time or at runtime. The compile time just refers to the declaration presence rather than the existence. And so needing to figure out how to pass attributes from the parsing stage from the compilation to when the constant actually gets defined at runtime was pretty tricky. And I'm thankful to be able to say that I got some help with that on GitHub from some other developers.
Scott Keck-Warren
17:56
Yeah, well, hope they— I'm, yes, I'm glad that somebody was able to help you because it does sound complicated. I like, again, like this is not my level of programming. Like this is obviously like, well, little bit above where I'm at. Um, and I do appreciate there's somebody who understands all of these things. There are a bunch of people, thankfully, that understand these things. Um, and that's a really interesting thought though. I didn't realize that, like, because obviously like the global constant, it has to run, right? Like that's the issue here is like, you can't, if you don't run it, then it doesn't define it.
Scott Keck-Warren
18:26
Whereas the classes are all like parsed as they're, as they're noticed.
Scott Keck-Warren
18:30
Yeah. And we'll be back after this word from our partners. Building PHP applications is your passion. Managing cloud infrastructure shouldn't be your headache. Displace is your partner in cloud infrastructure orchestration, giving solo developers and small teams the tools and automation to deploy enterprise-grade Kubernetes clusters without enterprise-grade complexity or cost. Their CLI tool streamlines everything from local development to fully managed cloud deployments on AWS, Azure, GCP, and more. Skip the steep learning curve of Docker, Kubernetes, and Terraform. Let our automation free you to focus on your core business without losing control over your infrastructure. Get started at displace.tech and discover how the right tools can eliminate the need for a full DevOps team. So, and so just like to, to kind of shift topics for a little bit. So like you are like the, one of the release managers for PHP 8.5. And can you talk to us a little bit about like how you became, like, what was it? What, what drove you to want to become one of the release managers? And then what does that actually entail from a day-to-day operation?
So for what drove me, there was a call on the mailing, on the internals mailing list of, hey, we need 2 volunteers to be release managers. Ideally, I don't remember the exact phrasing, but There was a note about ideally you're familiar with the internal code of PHP and how stuff works in terms of maintaining, for example, API compatibility is, oh, this PHP function has changed. ABI compatibility is, oh, this internal C function, because PHP is implemented in C, oh, this C function changed, and that is a change to the interface between PHP and the various extensions. So there was a note on, we'd prefer people with some understanding of the internals of PHP, and I had gotten commit access sometime prior, and I figured I could throw my hat in the ring and offer to help out. And from what I recall, for the 8.5 cycle, there were 4 people who volunteered. It's always better to have too much than too little, too many than too few, I guess. And so there was a vote on who would be the release managers, and I was one of 2 chosen. In terms of a day-to-day, the activity of a release manager generally comes in big spurts. So this is only— I can only talk about before the release of 8.5.0. I don't yet know what, what, how much the workload is for the every 4-week bug fix releases. But before the general availability, the other release manager and I have been switching off every every— it's not a full release, but every testing candidate. So I did Alpha 1 and they did Alpha 2. And you spend a couple hours on Tuesday going through and packaging the code that is, this is what the code is for Alpha 1, or this is the official state of the code for Release Candidate 1. And then there's a mailing list for release managers that also has a couple of people that do packaging of PHP. So they do the Windows builds and making the release candidates available on the various Unix-based system, Linux-based system, Linux, Unix, various NIX-based systems. And then on Thursday, it's the announcement of, hey, we have a new testing candidate available. And in the last, uh, month, month and a half maybe, um, there's been more of making sure we don't have big changes going into the, going into the release. Not new change, new big changes going into the release. So after the last alpha version was tagged, it was the soft feature freeze that said any new feature big enough to require an RFC needs to have, I think, already finished voting. Uh, and then there was the, uh, 8-week, 12-week period. No, there was some period during which those big RFCs could be implemented, but no new big features would be added. And then, uh, I think it was last week I branched the, the 8.5 release branch and— bless you. And so the master branch of PHP was now for 8.6. And from that point, it was also the, it was the hard feature freeze and even tiny features can no longer be added. Um, you know, the only thing that should be going into 8.5, the 8.5 branch is bug fixes.
Scott Keck-Warren
24:03
Okay. And that's, and that's where we're at. So this, this video should come out like, or this interview should come out on like Tuesday. So, so we're like, that's, that's the phase essentially we're at right now, right? Is like, we're, we're, we're in that, that release candidate phase where it's, it's nothing new except for bug fixes for like the next, what are we at now? 8 weeks? We have 8 weeks until the release? Because it's, it's the day after, for, um, as an American, it's Thanksgiving, I think is the day that we're releasing it or it's being released, right? The 27th or the 20th.
I should, I should know this off the top of my head, but I don't.
Scott Keck-Warren
24:36
Um, oh, okay. Sometime at the end of November, we're going to get like the actual release though. Yes. Yeah. So, and, and so, and then, so the, like, and you obviously you can't talk about like the post-release phase, so it'll be, and I'll be curious to like hear, you know, if you have a chance to talk about like how that works. 'Cause I know that like as a release manager, like you're, I don't wanna say locked in, but like you have to help like over the course of the life of, like you're the release manager for like the course of the life of, of 8.5, right? Like, so in 2 years you'll be done. Yeah. With, with being a release manager. Isn't it 2 years for support?
So it's 2 years for bug fixes and then another 2 years for security fixes. And given that I made this commitment in, at the start of 2025, uh, 8.5 comes out at the, near the end of 2025 and my commitment ends December 31st, 2029 at the end of If I'm doing my math right. 26 months? Yes. Uh, at the end of security support. So it's about a 4.5-year commitment, which might be the longest commitment I've ever made. Undergrad was only 4 years. Uh, high school was 4 years. Middle school was like, it's a, it's a long-term commitment, but the, the time commitment in terms of how much time I'm spending, um, is I expect it to go down significantly after 8.5 is released. Because at that point, 8.5 is just another one of the branches that accepts security fixes or bug fixes. But the release managers aren't necessarily a part of approving every one of those. Having contributed some bug fixes to 8.4, the release managers don't need to sign off on all those changes.
Scott Keck-Warren
26:27
Hmm. Okay. Well, that's interesting to know too. So I do have, unfortunately I have to like bring this to a close. Um, is there anything that you want to direct our listeners to?
Yes. So I believe it's 3 weeks from now. I will be presenting at the Longhorn PHP conference in Austin, Texas. Uh, I'll be talking about what's new in PHP 8.5, the deprecations, the new features. And the conference starts on, if I'm recalling correctly, conference starts on the same day that I'm announcing the 3rd release candidate for PHP 8.5. So there will be a fresh new set of bug fixes available for testing and everyone can go and explore and test it out. You shouldn't use 8.5 for production yet. That'll be in November. But I will be showcasing the features that are in 8.5 and will be available for production usage at Longhorn. You can follow my PHP contributions and other coding I do on my website, scherzer.dev. I have a blog there where I talk about PHP and other coding. I recently started teaching myself to code in Rust. Nice. Which has been fun and just want to say thank you for having me.
Scott Keck-Warren
27:53
Yeah. Thank you for finding time to talk to us. I do appreciate it.
Scott Keck-Warren
27:59
Yeah. I have to say another heartfelt thank you to Daniel for all of his time, as well as yours for listening. If you're not already a subscriber, make sure you subscribe with whatever your preferred method is so you can get the episodes as soon as they're released and maybe share this interview with a coworker or your supervisor to hopefully get them interested in going to Longhorn so you can hear Dan's talk. Uh, this podcast is available both in an audio version on the PHP Architect website, as well as a video version on our YouTube channel. This is Scott Keckboren for the PHP Architect Community Corner signing off and reminding you to keep listening, keep coding, and keep reading.