[00:21:20] originalauthority: what happens did an HTTP request from PHP times out/doesn't get a response [00:21:50] You get an error? [00:22:06] Question is very vague [00:22:33] well yea but error how. I'm looking through some extension code and saw handling of 400 and 499 errors and got curious [00:22:56] my inferance is that the response is just empty. or it explodes [00:23:04] It's not necessarily a thing you configure [00:23:05] I have no idea how php errors work [00:23:20] The timeout is configured in php.ini iirc [00:23:41] If no response is received after that time php closes the connection and your browser shows a request timeout screen [00:24:06] browser? in backend code? [00:26:13] It depends, if you're using HTMLForm for example configured to make a get request on submit, then a get request will be made, if no response is received in the time period then you will get a request timeout error [00:26:13] yea in this case i think its just returning null [00:26:33] Because nothing will be returned and php doesn't know what to do [00:26:44] This is backend extension not frontend. [00:27:12] Then it will either fail silently or throw an exception [00:28:06] Depends if the error is caught or not [00:29:14] Making a http request on the server kinda crazy though [00:29:30] Yeah there is a `if (!data[]): { yeet runtimeExplosion }` [00:30:02] originalauthority: yea but its an unsual case that by nature needs info from a seperate service [00:30:10] Yeah if the exception is thrown or returned then it will show to the user [00:31:33] i think it may be handled higher up since this is just the code that requests the data. the code that uses it may say aaaah shit it exploded welp lets try X [00:32:35] Crikey that code sounds like a barrel of fun [00:32:40] ``` [00:32:40]  public function getBaseUrl(): string { [00:32:41]   return $this->baseUrl; [00:32:41]  } [00:32:42] ``` [00:32:42] why are people like this [00:33:04] originalauthority: It's :sparkles: WMF code :sparkles: [00:33:04] That's how php is supposed to be used:) [00:33:10] why [00:33:20] I know object orientated programming is foreign to you python developers but [00:33:27] We have classes [00:35:37] Thought as much [00:38:48] originalauthority: id probably have written functionaly the same/very similar thing in python if i got off my ass and got time, not sure if thats better or worse to you [00:42:25] What is wrong with that? [00:42:47] just [00:42:48] why [00:42:51] whats the point [00:42:57] But why what? [00:43:05] I don't understand lol [00:43:13] why not just use $this->baseUrl directly [00:43:44] In PHP use methods rather than property access is better. I do it exactly like that as well. [00:43:56] uh huh [00:43:58] but [00:43:59] why [00:44:31] Because it is and it looks better it, it is more clear what you are actually doing. [00:44:41] but why is it better [00:45:12] Because I say it is? lol jk but really its more of a preference in MediaWiki standards. [00:45:37] ah yes of course, the word of the cosmos is law... [00:45:49] I really can't wait for property hooks in PHP 8.4 [00:45:57] que [00:46:36] Even though I probably won't use them much lol but I do love they finally exist. [00:47:44] what r thoes [00:48:38] [1/17] ```php [00:48:39] [2/17] class User [00:48:39] [3/17] { [00:48:39] [4/17] public string $name { [00:48:40] [5/17] set { [00:48:40] [6/17] if (strlen($value) === 0) { [00:48:40] [7/17] throw new ValueError("Name must be non-empty"); [00:48:40] [8/17] } [00:48:41] [9/17] $this->name = $value; [00:48:41] [10/17] } [00:48:41] [11/17] } [00:48:42] [12/17] public function __construct(string $name) { [00:48:42] [13/17] $this->name = $name; [00:48:43] [14/17] } [00:48:43] [15/17] } [00:48:44] [16/17] ``` [00:48:44] [17/17] Is an example from php.net because I was to lazy to make my own right now. [00:48:48] https://wiki.php.net/rfc/property-hooks [00:49:46] you forget im stupid and know about as much PHP as I do COBOL [00:49:50] Final RfC result: 42-2 lol those 2 just wanted to disagree I think. [00:50:04] Oooh COBOL is fun lol [00:50:23] dear lord [00:50:44] hmm? [00:53:09] im not even really good at python and have lightly dabbled in *counts in head* 5(???) other languages stop making me curious about languges from *checks wikipedia* 65 years ago [00:53:46] Lmao [00:54:00] is it really 65 years old? [00:54:03] wow [00:54:09] Its a fun language [00:54:50] thats older then my parenys [00:55:17] also TIL COBOL became object oriented in 2002 [00:58:59] anyways curious to see how well AutoModerator works on WM [00:59:08] and how badly it would work here [01:01:16] Just really seems a bit silly [01:01:56] [1/4] The exact same outcome js already possible doing [01:01:56] [2/4] ```php [01:01:56] [3/4] public function setName( ... ) [01:01:57] [4/4] ``` [01:03:39] There is way more to it then that. [01:13:07] TIL ORES is also an extension [14:53:10] [1/2] may someone needs to unlock OS (idk if i should) [14:53:11] [2/2] https://cdn.discordapp.com/attachments/1006789349498699827/1294674230851403947/image.png?ex=670bded6&is=670a8d56&hm=c84904b4ff9708c518d17ba42b4a06d1213d246169fc520d48752aca9e93e6a5& [14:54:39] No you shouldn't [14:54:48] @cosmicalpha should do that [14:55:36] I already pinged him about that after getting confirmation that OS wanted to use that account [14:57:22] 👍 [14:58:04] I nearly used (y) and instead of :thumbsup: and forgot that discord isn't Cisco [15:20:39] You have a mark locked gadget? [15:20:56] Can I have 👉 👈 [15:22:01] [[User:Waki285/MarkBLockedTS.js]] [15:22:02] [15:22:10] this is farm-wide compatible hooray [15:23:18] I read a farm-wide conspiracy theory [15:23:39] How many of these do you have [15:24:51] [1/2] centralAuthLink (made by Void), MarkBLockedTS, Selective Rollback (made by WMF-wikis user, ported by me), markGlobalGroups [15:24:51] [2/2] https://cdn.discordapp.com/attachments/1006789349498699827/1294682202327486557/image.png?ex=670be643&is=670a94c3&hm=a43cf8b99350687117230d796aa6142f1c7a8d9fe20da766aa0d12439dd95acc& [15:25:30] I use global groups already (modified colors though) [15:25:37] Gonna Rob you in a bit [16:15:15] I will if there is confirmation they want it [16:29:27] cosicalpha: there is (see mattermost) [16:31:14] cosmicalpha: * [16:31:40] There is ye CosmicAlpha [16:32:16] I see now. I will do in a few mins [16:54:37] And done