!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

84 Members
A room for PHP developers running on Nix25 Servers

Load older messages


SenderMessageTime
3 Oct 2022
@ramsey:matrix.orgramsey but that's a cumbersome API, so I'll just not put @psalm-immutable on the class 🙂 17:55:52
@drupol:matrix.orgPolTrue.17:55:58
@drupol:matrix.orgPolAnd doing this?17:57:02
@drupol:matrix.orgPolimage.png
Download image.png
17:57:03
@drupol:matrix.orgPolBut that is not what you want right?17:57:42
@drupol:matrix.orgPol(you told me on Twitter)17:57:48
@ramsey:matrix.orgramsey it's the same problem... because the class calls random_bytes() either directly or indirectly, it is mutating the machine's state 17:58:30
@drupol:matrix.orgPolDoah. Right.17:58:38
4 Oct 2022
@jtojnar:matrix.orgJan TojnarI wonder if we could make the flake update action trigger on the channel advancement20:28:54
@drupol:matrix.orgPolThat would be an amazing improvement20:36:49
@drupol:matrix.orgPolSo we can get rid of the cronjob20:36:59
@drupol:matrix.orgPolI've already looked for that20:37:09
@drupol:matrix.orgPolI haven't found anything20:37:12
@drupol:matrix.orgPolLet me know if you have found something, I'm highly interested20:38:51
12 Oct 2022
@jtojnar:matrix.orgJan Tojnar gah, I am having a weird issue where DOMDocument, where loadHTML does not do anything, with no errors reported. But only when running the script from Apache, it works completely fine on CLI with the same PHP derivation and php.ini. Tried both 8.0 and 8.1. 13:20:47
@jtojnar:matrix.orgJan Tojnar

The following script, in case someone wants to try to reproduce it:

<?php
// phpinfo();
// die;
var_dump(libxml_use_internal_errors(true));
$domDocument = new \DOMDocument();
$html = <<<HTML
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <title>Test</title>
    </head>
    <body>
        Test.
    </body>
    </html>
    HTML;
$domDocument->loadHTML($html);
var_dump($domDocument->textContent);
var_dump(libxml_get_errors());
13:23:40
@drupol:matrix.orgPoltrying19:58:38
@drupol:matrix.orgPolWhen it comes to DomDocument, I use this construction: https://github.com/ecphp/cas-lib/blob/master/src/Utils/Response.php#L6320:00:31
@drupol:matrix.orgPolMaybe you should try and see if it fails20:00:41
@jtojnar:matrix.orgJan Tojnar Pol: should not the restore_error_handler(); be in a finally block, or otherwise it will never run? 21:04:14
@jtojnar:matrix.orgJan Tojnar * Pol: should not the restore_error_handler(); be in a finally block, or otherwise it will never run? 21:04:19
@drupol:matrix.orgPolGood question, will check tomorrow, I left the pc21:06:05
@jtojnar:matrix.orgJan TojnarI had to introduce a similar fix in https://github.com/ddeboer/transcoder/pull/521:06:18
@drupol:matrix.orgPolI remember I got inspired by symfony.21:07:20
@jtojnar:matrix.orgJan Tojnar I do not think the custom error handler will help here, I already have display_errors=1 and error_reporting=E_ALL 21:09:24
@jtojnar:matrix.orgJan Tojnar Looks like loadXML works, though, (since I made the sample HTML document a well-formed XML document) 21:11:20
@jtojnar:matrix.orgJan Tojnarso it looks like only HTML loading is busted, an only in Apache. Will try to switch to php-fpm next21:12:11
@drupol:matrix.orgPolCurious21:13:10
@drupol:matrix.orgPolI will query google tomorrow. Off to bed now 21:13:33
@drupol:matrix.orgPolRedacted or Malformed Event21:13:49

Show newer messages


Back to Room ListRoom Version: 6