[00:08:42] apparently you can, heh [00:09:51] So, I've forked Extension:Variables and I'm attaching the variables array to the PPFrame instead of the Parser, but the variables all end up empty even when defined... Doesn't a PPFrame object exist for the entire duration of the parsing of one particular page / transclusion of one template? [00:29:04] don't understand why this isn't working but have to sleep now [00:32:51] shouldn't something like this work? https://paste.debian.net/1290631/ maybe someone will answer while I'm gone, just leaving this here [00:54:38] taylan: setting dynamic properties on objects is deprecated as of PHP 8.2 [00:55:39] and I think you probably don't understand what a parser frame is/does [01:19:01] (as it happens, I'm still awake) [01:20:43] moonmoon: That's quite possible, that I misunderstand what it is. Is there any way to associate values with the current "context" during parsing, where "context" is dependent on which page is currently being parsed/transcluded? [01:21:04] I had assumed that frames represent such a context. [01:28:35] so the frame getting passed to a parser function is for that particular parser function call [01:29:02] its parent frame is the page calling the parser function, that page's parent is the one transcluding that page, and so on [01:30:33] oh, so if I just get the parent, it should work? [01:30:54] gonna try that [01:31:43] well it'll work for *that* page in particular [01:31:58] basically if you have nested templates, your thing isn't going to work particularly well [01:32:07] think of parser frames as call stack frames in a programming lang [01:32:57] yeah that's how I've been thinking about it, just didn't know the parser function gets its own frame [01:33:23] I think it should work if I use the parent frame, but I can't seem to find how to get a frame's parent... [01:35:06] imo don't worry about frames at all and do your original plan of having your own storage [01:35:14] due to what I mentioned about PHP 8.2 [01:35:29] storing random crap on the frame is going to break eventually [01:36:59] If you mean using an array and spl_object_id, the same problem applies, because I was planning to call spl_object_id on the frame. I need some association to the frame, because I'm trying to modify the Variables extension to make variables local to the page in which they're defined. [01:37:14] context: https://www.mediawiki.org/wiki/Topic:Xovg9qt39etosd7r [01:37:49] I can use the array / spl_object_id trick to work around the deprecation of dynamic props but I still need to get some object that represents the page currently being parsed... [01:38:03] *parsed or transcluded [01:42:37] from what I can tell by reading Parser.php, it doesn't actually seem to create a new frame before calling the parser function... [01:48:57] I might be misreading it. I thought braceSubstitution() does all the substitution but I don't see it looping or anything; I guess it's called in a loop somewhere else and it may be called with a new frame each time. [01:54:05] aha, if a frame is a template frame ($frame->isTemplate()) then it means it's a PPTemplateFrame which has a public $parent property. [02:32:07] that didn't help either. from my reading of Parser and PPFrame, the original way I did it should actually be fine. I'll have to do some debugging after I've gotten some sleep to better understand how all this works. [03:55:16] Does textextracts not work with newer versions of php? (8.2.9 (fpm-fcgi)) [03:55:40] Any API call returns 500 [15:16:49] which point version of 1.35 bumped the php requirements to 7.4? [15:21:58] Juest: none [16:04:08] moonmoon: FYI, re. the stuff we talked about yesterday: using the frame was fine after all (it's *not* a new frame per parser function call) and the problem was just my lacking PHP knowledge. Here's working code: https://www.mediawiki.org/wiki/Topic:Xovg9qt39etosd7r [16:05:04] I believe this should be PHP 8.2-safe without producing warnings [16:05:46] in particular, apparently something like "self::$mVarStorage[ $fid ][ $varName ] = $value;" is perfectly fine when self::$mVarStorage[ $fid ] may not even have been set to an array yet [16:53:43] thanks vulpix [17:20:18] the only way to reliably update mediawiki is via git? [17:21:14] the only way to reliably update mediawiki is via git? [17:21:24] aren't there update instructions on the wiki? I just use git nowadays but I'm pretty sure there's instructions for using the tarballs to update too. [17:22:32] Juest: https://www.mediawiki.org/wiki/Manual:Upgrading [17:22:44] true, but with tarballs i have no way of knowing if there's something that needs updating [17:22:52] with git i can easily just update [17:23:13] with tarballs you update from release to release [17:23:44] the annoyance with tarballs is that i need to redownload the updates every time [17:23:49] if your Special:Version page says you're on 1.39.3 but there's a tarball for 1.39.4, you know there's something to update ;) [17:23:51] i have various extensions [17:24:02] yeah how about non-bundled extensions? [17:24:13] its harder to find out if it needs updating [17:24:23] yeah you have to update those separately, but that's the same with git, since they're independent [17:24:38] yeah [17:24:57] like, in theory, you could have MW be updated via git but then drop in extension tarballs. I use git for everything tho, no point in not going all the way when you're already familiar with git... [17:25:08] yeah of course [17:25:20] i plan to upgrade my mw install and extensions to git [17:25:31] but its a bit of a pain in the butt [17:26:44] yeah, I sure wish MW had better separation of code, data, and configuration... but bundling everything in /var/www/blah is a pretty common thing with web applications unfortunately [17:27:48] anyway I gotta go [17:27:50] yeah [17:27:51] cya