Page MenuHomeDevCentral

Update phpdox install process
Closed, DuplicatePublic

Description

For devserver role, d893d8bf7b60ff8678e599a939ca361328e63bbe offers to deploy phpdox as a .phar release.

But instead of the documented 0.12.0, we've a /opt/phpdox providing 0.12.1-dev.

Meanwhile, the CI job for Notifications Center fails under PHP 8.2.4:

[phpdox] PHP Version: 8.2.4 (Linux)
[phpdox] PHPDox Version: 0.12.0
[phpdox] Exception: Error (Code: 0)
[phpdox] Location: phar:///opt/phpdox.phar/phpdox/shared/Environment.php (Line 46)
[phpdox] 
[phpdox] Call to undefined function TheSeer\phpDox\xdebug_disable()
[phpdox] 
[phpdox] #0 phar:///opt/phpdox.phar/phpdox/CLI.php(50): TheSeer\phpDox\Environment->ensureFitness()
[phpdox] #1 /opt/phpdox.phar(484): TheSeer\phpDox\CLI->run()

And:

[phpdox] PHP Version: 8.2.4 (Linux)
[phpdox] PHPDox Version: 0.12.0
[phpdox] ErrorException: E_DEPRECATED 
[phpdox] Location: phar:///opt/phpdox.phar/phpdox/shared/FileInfo.php (Line 82)
[phpdox] 
[phpdox] Return type of TheSeer\phpDox\FileInfo::getPathInfo($class_name = null): void should either be compatible with SplFileInfo::getPathInfo(?string $class = null): ?SplFileInfo, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
[phpdox] 
[phpdox] No stacktrace available

Event Timeline

dereckson renamed this task from Update phpdox instal process to Update phpdox install process.Mar 25 2023, 23:41
dereckson updated the task description. (Show Details)
dereckson added projects: Jenkins, Servers, Salt.

The xdebug one is fixed by this commit, that's why it doesn't occur on WindRiver:

commit 6a019b7f4f043d06718e3190d1adc952dd6472c2
Author: panaceya <panaceya@users.noreply.github.com>
Date:   Tue Dec 8 11:51:08 2020 +0200

    Update Environment.php

    Since xdebug version 3.0.0 removed function xdebug_disable(), this raise exception
    `Call to undefined function TheSeer\phpDox\xdebug_disable()`.

diff --git a/src/shared/Environment.php b/src/shared/Environment.php
index 8a5ef7b..fada249 100644
--- a/src/shared/Environment.php
+++ b/src/shared/Environment.php
@@ -43,7 +43,11 @@ class Environment {
         \ini_set('xdebug.scream', 'off');
         \ini_set('xdebug.max_nesting_level', '8192');
         \ini_set('xdebug.show_exception_trace', 'off');
-        xdebug_disable();
+        \ini_set('xdebug.mode', 'off');
+
+        if (function_exists('xdebug_disable')) {
+            xdebug_disable();
+        }
     }

     private function ensureTimezoneSet(): void {
dereckson added a subscriber: DorianWinty.

The other one is reported upstream - https://github.com/theseer/phpdox/issues/424

On WindRiver, we peered @DorianWinty and me last year to fix every deprecation if I remember, so perhaps we should fork phpdox and the components in a monorepo to have it compatible with PHP 8.2? Or should we drop it from CI? In all case, result is not committed and avalaible in /opt/phpdox (and the vendor subdirs!)

dereckson triaged this task as High priority.Mar 26 2023, 00:20