- Issue created by @danepowell
- πΊπΈUnited States rclemings
Please do. I may not be able to test it right away but at least it will be available for anyone who needs it.
Most if not all of the other patches you see were written by me and have not been reviewed by anyone else. If they work for you and you're comfortable doing so, please mark them RTBC and I can put them in a new release.
- @danepowell opened merge request.
- πΊπΈUnited States danepowell
I was a little naive assuming this was a run-of-the-mill deprecation. The module is actually overriding a Drupal HTTP response in a way that breaks encapsulation and requires significant refactoring to fix properly.
I took a more targeted approach in the linked merge request, which only modifies the affected function and preserves backwards compatibility with the rest of the module. Read: I'm kicking the refactoring can down the road :)
- πΊπΈUnited States rclemings
I spun up a site with PHP 8.3.13 and the patch worked, with no obvious harm to a site running PHP 8.1.32, so I've merged it. Thanks.
- πΊπΈUnited States rclemings
I'm getting this WSOD intermittently now:
Error: Call to undefined method stdClass::getStatusCode() in _user_mailman_register_parse_http() (line 1050 of modules/contrib/user_mailman_register/user_mailman_register.module).
I think the problem is this code is in the try and catch blocks just prior but isn't available at line 1050:
// Add convenience methods if ($response) { $result->getBody = function() use ($response) { return $response->getBody(); }; $result->getStatusCode = function() use ($response) { return $response->getStatusCode(); }; }
I added that code again before line 1050 and it seemed to take care of the error. Does that look right to you? Probably not the best way to address the problem though.
- πΊπΈUnited States danepowell
None of this is the best way to address the problem :) I was just trying to avoid a more significant refactor.
I guess you could define the convenience methods a second time outside the try/catch block. It sounds like you are referencing some specific code, but I don't see that you've made any commits?
- πΊπΈUnited States rclemings
rclemings β changed the visibility of the branch 3526170-dynamic-property-deprecated to hidden.
- @rclemings opened merge request.
-
rclemings β
committed e0283f51 on 1.0.x
Issue #3526170 by danepowell: Dynamic property deprecated.
-
rclemings β
committed e0283f51 on 1.0.x
- πΊπΈUnited States rclemings
Unfortunately, I'm still getting sporadic errors, sporadic I guess because the module doesn't need to hit the Mailman site on every request. I can't tell for sure but it looks to me as if the problem lies is in the "convenience methods." So I've tried a different approach, just copying the results of the getBody() and getStatusCode() functions to the $result variable.
$result->body = $response->getBody(); $result->statusCode = $response->getStatusCode();
(Lines 992-993 of user_mailman_register.module)
So far, I'm not seeing any errors with PHP 8.3.13. Fingers cross.
Let me know if you see a problem with this change.