rNOTIF is being upgraded to run under PHP 8.1 and recent Laravel version.
As such, CI should cope with those modernized tools.
dereckson | |
May 8 2022, 15:07 |
F1849763: image.png | |
May 22 2022, 12:52 |
F1837290: phpdox.tar.gz | |
May 8 2022, 15:14 |
rNOTIF is being upgraded to run under PHP 8.1 and recent Laravel version.
As such, CI should cope with those modernized tools.
rDJENKINSAGENTS Docker images for Jenkins agents | |||
D2922 | rDJENKINSAGENTSf8c7b4950ed1 Allow phpdox to run under PHP 8.1 and PHP 8.2 | ||
rOPS Nasqueron Operations | |||
D2923 | rOPSeec64e7da13a Install phpdox from nasqueron/phpdox for PHP 8.1 and 8.2 compliance | ||
D2684 | rOPSd893d8bf7b60 Install phpcpd, phpdox and phploc on devserver | ||
rNOTIF Notifications center | |||
D2683 | rNOTIF6f15d833cf3f Modernize build.xml |
phpDox isn't currently compatible with PHP 8.1. Deprecations are transformed into fatal errors, even if at the start an error_reporting() instruction is left.
As a workaround, here phpDox 0.12.0-27-geb943cb-dirty, with PHP 8.1 deprecation notices for signatures mismatch addressed.
Some have been reported upstream, but as the phpDox dependencies inherit PHP builtin classes to override signatures, e.g. transforming a string|bool into a string, throwing an exception instead of returning false, perhaps upstream will adopt another approach than use false signatures.
It has been manually deployed on WindRiver and Zateki (Jenkins agent for CI, PHP 8 flavour).
Still some issues with phpdox at https://ci.nasqueron.org/job/test-notifications-php/222/console (job triggered after commit is published to GitHub):
[phpdox] [21.05.2022 - 20:03:31] The following file(s) had errors during processing and were excluded: [phpdox] [21.05.2022 - 20:03:31] - /home/app/workspace/test-notifications-php/app/Analyzers/Jenkins/JenkinsPayloadAnalyzer.php (Undefined array key 403 [Lexer.php:323]) [phpdox] [21.05.2022 - 20:03:31] Saving results to directory '/home/app/workspace/test-notifications-php/build/phpdox' [phpdox] [21.05.2022 - 20:03:31] Resolving inheritance [phpdox] ErrorException: E_DEPRECATED [phpdox] Location: /opt/phpdox/vendor/theseer/fdomdocument/src/fDOMElement.php (Line 276) [phpdox] [phpdox] DOMElement::setAttribute(): Passing null to parameter #2 ($value) of type string is deprecated
For the test-notifications-php job, the builds fail because some tests are skipped.
3 tests are marked as incomplete, which isn't acceptable for the current plugin config.
INFO: The total number of tests for the threshold 'Skipped Tests' exceeds the specified "failure threshold" value. INFO: Setting the build status to FAILURE Build step 'Publish xUnit test result report' changed build result to FAILURE
Configuration in Jenkins UI:
Issue reported for threshold solved.
Lexer.php 403 key issue still to solve, but not breaking the build.
PHP 8.2 introduced a new bunch of deprecations, and sometimes, we need to update Jenkins PHP agents images, so a manual fix isn't desired.
Meanwhile, in November 2022, maintainer stated intent to improve the situation, without any time frame estimate.
As such, best course of action seems to prepare a temporary phpdox fork to use on our CI infrastructure.
Plan is to maintain it as long as needed, ie until we don't use phpdox (we don't have plan not to use it) or upstream makes it compatible with PHP 8.
For reference, the fork has been prepared like this: