Composer install/update for extensions with underscore in their key is no longer possible
What was the cause of the issue?
When trying to install an extension from TER via composer whose key contains an underscore, the download returns a 404.
Steps to reproduce
Take this composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://composer.typo3.org/"
}
],
"require": {
"typo3/cms": "~7.6.15",
"typo3-ter/typoscript-rendering": "~2.0.1"
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": "web"
}
}
}
put it somewhere and run composer update
in the folder. If the package is locally cached, you need to clear the composer cache before the problem occurrs.
Output of error log
Composer output:
Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Package operations: 17 installs, 0 updates, 0 removals
- Installing typo3/cms-composer-installers (1.4.2): Loading from cache
- Installing typo3/class-alias-loader (1.0.0): Loading from cache
- Installing pear/net_url2 (v2.2.1): Loading from cache
- Installing pear/pear_exception (v1.0.0): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing symfony/debug (v3.0.9): Loading from cache
- Installing symfony/polyfill-mbstring (v1.5.0): Loading from cache
- Installing symfony/finder (v2.8.26): Loading from cache
- Installing symfony/console (v2.8.26): Loading from cache
- Installing swiftmailer/swiftmailer (v5.4.8): Loading from cache
- Installing psr/http-message (1.0.1): Loading from cache
- Installing pear/http_request2 (v2.3.0): Loading from cache
- Installing mso/idna-convert (v0.9.1): Loading from cache
- Installing doctrine/instantiator (1.0.5): Loading from cache
- Installing cogpowered/finediff (0.3.1): Loading from cache
- Installing typo3/cms (7.6.21): Loading from cache
- Installing typo3-ter/typoscript-rendering (2.0.2): Downloading (failed)
[Composer\Downloader\TransportException]
The "https://typo3.org/extensions/repository/download/typoscript_rendering/2.0.2/t3x/" file could not be downloaded (HTTP/1.1 302 Moved Temporarily)install -prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [- []...
When opening the URL in a browser, the redirect is followed to https://extensions.typo3.org/extension/download/typoscript_rendering/2.0.2/t3x/
and a 404 is returned. The correct URL to redirect to would be https://extensions.typo3.org/extension/download/typoscript-rendering/2.0.2/t3x/
.