Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation and regression coverage are sound, with only a minor PHPDoc correction noted.
Review effort: Balanced
Findings: 1
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); |
|
| } | ||
| } | ||
| $oiTopExtensionsMap = new iTopExtensionsMap(bNoScan: true); | ||
| $oiTopExtensionsMap->ReadDir($sSearchDir, iTopExtension::SOURCE_REMOTE, bIsRootDir: true); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
| foreach ($oiTopExtensionsMap->aExtensionsByCode as $sCode => $oExtension) { | ||
| /** @var iTopExtension $oExtension */ | ||
| $aRes[$sCode] = $oExtension->sLabel; |
There was a problem hiding this comment.
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.
|
What is an extension disturb setup? |

No description provided.