Conversation
| $this->_before_files = FileSystem::scanDirFiles(DOWNLOAD_PATH, false, true, true) ?: []; | ||
|
|
||
| // load downloaders | ||
| $this->downloaders = require ROOT_DIR . '/config/downloader.php'; |
There was a problem hiding this comment.
This seems like it's not the greatest idea. Should the file instead define the method that we autoload and call here?
There was a problem hiding this comment.
Make it in core registry config?
There was a problem hiding this comment.
I'm not sure as I haven't had the time to familiarise myself with v3 yet. But I think this should optimally be part of Downloader.php or something as a method.
There was a problem hiding this comment.
We already have #[CustomBinary] and #[CustomSource] for using custom download method, but they are registered to a specific package artifact and cannot reuse between different artifacts.
What I'm thinking is that in some edge cases we or others can dynamically add or enhance download types, such as rewriting GitHub URLs or adding commonly used advanced crawlers. For example, replacing the implementation of ghtar in a custom method can expand or customize the functionality globally.
What does this PR do?
Checklist before merging
*.phpor*.json, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:sort-configsrc/globals/test-extensions.php.extension testortest extensionsto trigger full test suite.