feat: declare tool dependencies in package configs via tools field

- Add 'tools' field to ConfigValidator for build-time tool declarations
- Move jom and strawberry-perl from depends@windows to tools@windows in openssl.yml
- Move go-xcaddy/go-win from depends to tools in frankenphp.yml
- Register config/pkg/tool/ path in spc.registry.yml
- Use addInstallPackage for upx tool in php.php (ToolPackage instead of library dep)
- Include 'tool' type in DumpCapabilitiesCommand and InstallPackageCommand package lists
This commit is contained in:
crazywhalecc
2026-07-06 15:10:22 +08:00
parent 1bdbdfc08c
commit dd1e70a394
7 changed files with 22 additions and 8 deletions

View File

@@ -24,6 +24,10 @@ class ConfigValidator
'lang' => ConfigType::STRING,
'frameworks' => ConfigType::LIST_ARRAY, // @
// build-time tool dependency declaration (resolved independently of the library
// dependency graph, see PackageInstaller::collectRequiredTools())
'tools' => ConfigType::LIST_ARRAY, // @
// php-extension type fields
'php-extension' => ConfigType::ASSOC_ARRAY,
'zend-extension' => ConfigType::BOOL,
@@ -63,6 +67,9 @@ class ConfigValidator
'lang' => false,
'frameworks' => false, // @
// build-time tool dependency declaration
'tools' => false, // @
// php-extension type fields
'php-extension' => false,