Skip to content

N°10151 - Missing extension.xml in extension disturb setup - #1067

Closed
odain-cbd wants to merge 5 commits into
developfrom
issue/10151-mtp
Closed

odain-cbd wants to merge 5 commits into
developfrom
issue/10151-mtp

Conversation

@odain-cbd

Copy link
Copy Markdown
Contributor

No description provided.

@odain-cbd odain-cbd self-assigned this Oct 6, 2026
Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:07
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Oct 6, 2026
@odain-cbd odain-cbd closed this Oct 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation and regression coverage are sound, with only a minor PHPDoc correction noted.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Enables setup to discover extensions without extension.xml by scanning module definitions.

Changes:

  • Reuses recursive extension-map scanning for directory discovery.
  • Handles missing optional documentation URLs.
  • Adds coverage for XML and module-only extensions.
File Description
setup/​extensionsmap.class.inc.php Adds scan-free maps and module-based discovery.
tests/​php-unit-tests/​unitary-tests/​setup/​ExtensionsMapTest.php Tests XML and XML-less extension layouts.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}
}
$oiTopExtensionsMap = new iTopExtensionsMap(bNoScan: true);
$oiTopExtensionsMap->ReadDir($sSearchDir, iTopExtension::SOURCE_REMOTE, bIsRootDir: true);
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 2/5

[Medium risk] Adjusts extension scanning logic and test coverage.

The PR does not appear safe to merge because extension discovery can omit valid extensions, abort on nested XML, or select modules intended to remain hidden.

Findings

  1. P1 Hidden modules become compilation choices ▶
  2. P1 Extension subdirectories can be skipped ▶
  3. P1 Nested XML can abort deployment ▶
Summary

The PR changes extension-directory listing to use the extension scanner, allowing module-only extensions without extension.xml to appear in the result, and adds tests for that behavior.

  • The new listing also returns non-visible and auto-selected module-only entries as compilation choices.
  • Both previously reported recursive-scan issues remain outstanding.

Reviews (2) · Last reviewed commit: "N°10151 - Missing extension.xml in exten..."

}
}
$oiTopExtensionsMap = new iTopExtensionsMap(bNoScan: true);
$oiTopExtensionsMap->ReadDir($sSearchDir, iTopExtension::SOURCE_REMOTE, bIsRootDir: true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Extension subdirectories can be skipped If a -modules directory contains a module.*.php file alongside extension subdirectories, ReadDir returns after reading the module and never visits those subdirectories. The previous scan still read their extension.xml files. Their codes can therefore be missing when hub deployment determines which extensions to add, causing a selected extension to be omitted.

}
}
$oiTopExtensionsMap = new iTopExtensionsMap(bNoScan: true);
$oiTopExtensionsMap->ReadDir($sSearchDir, iTopExtension::SOURCE_REMOTE, bIsRootDir: true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Nested XML can abort deployment If a deeper directory contains a malformed extension.xml, the new recursive scan opens it and XMLParameters throws. Hub deployment does not handle that exception, so compilation aborts even though the previous immediate-child scan would not have read the file.

@odain-cbd odain-cbd reopened this Oct 6, 2026
Comment on lines +412 to +414
foreach ($oiTopExtensionsMap->aExtensionsByCode as $sCode => $oExtension) {
/** @var iTopExtension $oExtension */
$aRes[$sCode] = $oExtension->sLabel;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Hidden modules become compilation choices When a module-only directory contains a module marked visible => false or auto_select, ReadDir adds it to the map but this loop returns its code without checking visibility. Hub compilation then treats that code as an added extension, despite the module being marked as one that should not be offered for selection.

@Hipska

Hipska commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

What is an extension disturb setup?

@odain-cbd odain-cbd closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants