Skip to content

Commit

Permalink
Merge branch '6.3' into 6.4
Browse files Browse the repository at this point in the history
* 6.3:
  [AssetMapper] Improve the error message when a downloaded file is missing
  [HtmlSanitizer] Allow league/uri v7
  • Loading branch information
nicolas-grekas committed Aug 23, 2023
2 parents c24906f + 897a054 commit 62e115f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -138,6 +138,7 @@
"egulias/email-validator": "^2.1.10|^3.1|^4",
"guzzlehttp/promises": "^1.4",
"league/html-to-markdown": "^5.0",
"league/uri": "^6.5|^7.0",
"masterminds/html5": "^2.7.2",
"monolog/monolog": "^1.25.1|^2",
"nyholm/psr7": "^1.0",
Expand Down
Expand Up @@ -411,6 +411,10 @@ private function convertEntriesToImports(array $entries): array

if (null !== $entryOptions->path) {
if (!$asset = $this->assetMapper->getAsset($entryOptions->path)) {
if ($entryOptions->isDownloaded) {
throw new \InvalidArgumentException(sprintf('The "%s" downloaded asset is missing. Run "php bin/console importmap:require "%s" --download".', $entryOptions->path, $entryOptions->importName));
}

throw new \InvalidArgumentException(sprintf('The asset "%s" mentioned in "%s" cannot be found in any asset map paths.', $entryOptions->path, basename($this->importMapConfigPath)));
}
$path = $asset->publicPath;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HtmlSanitizer/composer.json
Expand Up @@ -18,7 +18,7 @@
"require": {
"php": ">=8.1",
"ext-dom": "*",
"league/uri": "^6.5",
"league/uri": "^6.5|^7.0",
"masterminds/html5": "^2.7.2"
},
"autoload": {
Expand Down

0 comments on commit 62e115f

Please sign in to comment.