[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] ConsoleApplicationBuilder.php: fix console command lookup when reusing cached instances
"Sammy Ndabo \(@ndabosam084\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a1e9db66e1e7_38193f20-450@gitlab-sidekiq-low-urgency-cpu-bound-v2-78f95fdcd-9h4ql.mail> |
Sammy Ndabo pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
cfcb0739 by Sammy Ndabo at 2026-06-02T09:01:42+00:00
[BP][FIX] ConsoleApplicationBuilder.php: fix console command lookup when reusing cached instances
---
* [BP][UPD] tiki-monitor.php: Add SchedulerLastRun and SchedulerHealthy monitoring metrics
---
* [FIX] ConsoleApplicationBuilder.php: fix console command lookup when reusing cached instances
---
* [REF] ConsoleApplicationBuilder.php: remove the default 1100 value to callers
* [FIX] ConsoleApplicationBuilder.php: revert to the previous constants declaration
* [REM] ConsoleApplicationBuilder: completely removed the called command parameter and update all the callers
* [FIX] ConsoleApplicationBuilder.php: cache only fully initialized console instance
* [FIX] ConsoleApplicationBuilder.php: fix console command lookup when reusing cached instances
See merge request tikiwiki/tiki!10127
(cherry picked from commit bf52c5ea584dfd72b27a52cecb64d397d884a8fd)
* [UPD] tiki-monitor.php: Add SchedulerLastRun and SchedulerHealthy monitoring metrics
---
* [UPD] tiki-monitor.php: Add SchedulerLastRun and SchedulerHealthy monitoring metrics
See merge request tikiwiki/tiki!9994
(cherry picked from commit ab1110329d4fea4dc36ea4e2262244e337d77b6f)
See merge request tikiwiki/tiki!10420
(cherry picked from commit 10e7e6110c67958071d08cd265e67c122426a096)
See merge request tikiwiki/tiki!10422
- - - - -
2 changed files:
- lib/core/Tiki/Command/ConsoleApplicationBuilder.php
- lib/core/Tiki/Package/Extension/Extension.php
Changes:
=====================================
lib/core/Tiki/Command/ConsoleApplicationBuilder.php
=====================================
@@ -526,13 +526,17 @@ class ConsoleApplicationBuilder
* Iterates over all commands in the list, and registers / doesn't register the commands in accordance with the result
* of the check function and the action configured for the command group
*
- * @param boolean $returnLastInstance
+ * @param int|bool $statusCode
* @return Application
*/
public function create($statusCode = 1100): Application
{
global $tikipath;
+ if (is_bool($statusCode)) {
+ $statusCode = 1100;
+ }
+
if (self::$lastInstance) {
return self::$lastInstance;
}
@@ -552,8 +556,6 @@ class ConsoleApplicationBuilder
$console->setName('Tiki Console Tool');
$console->setCatchExceptions(false);
- $commandCalled = $_SERVER['argv'][1] ?? false;
-
/**
* @var $condition string The name of the check method to be executed
* @var $actions array List of actions that should apply to a group of commands
@@ -615,10 +617,6 @@ class ConsoleApplicationBuilder
}
}
$console->add($command);
- // If the command exactly matches one that was requested, stop processing further commands as they will not be used anyhow.
- if ($commandCalled === $command->getName()) {
- break 2;
- }
}
}
=====================================
lib/core/Tiki/Package/Extension/Extension.php
=====================================
@@ -245,7 +245,7 @@ class Extension
foreach ($finder->in($path)->depth('== 0')->directories() as $themeDir) {
try {
$consoleBuilder = new ConsoleApplicationBuilder();
- $console = $consoleBuilder->create(true);
+ $console = $consoleBuilder->create();
$command = $console->find($commandName);
$themeName = basename($themeDir);
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/cfcb07395eeb20458568ec809509b0fa74d2ec34
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/cfcb07395eeb20458568ec809509b0fa74d2ec34
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs