[AssetMapper] MappedAssetFactory->isVendor()
return true
when the directory is missing
#58858
Labels
8000
MappedAssetFactory->isVendor()
return true
when the directory is missing
#58858
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected
6.4
Description
MappedAssetFactory->isVendor()
returntrue
when the directory is missing, which leads to unexpected behaviours.For some reason,
str_starts_with('/app/assets/javascript/site_chart.js', null)
returnstrue
, so AssetMapper thinks that one file is in thevendor/
directory when it is not.3v4l: https://3v4l.org/iZfv4
How to reproduce
Try to use https://github.com/sensiolabs/minify-bundle while the directory
assets/vendor
doesn't exist: sensiolabs/minify-bundle#17 (comment)Possible Solution
Refactor
isVendor()
to handle this case.Additional Context
I don't know yet if
assets/vendor/
should or must be created by some automation (bin/console assets:install
,bin/console asset-map:compile
, or Symfony's recipes?) , butassets/vendor/
is added to.gitignore
by the recipes: https://github.com/symfony/recipes/blob/21ffab22d3d8641e626b52bbabc435b690dde218/symfony/asset-mapper/6.4/manifest.json#L10 so it looks like it's possible to miss this directory.The text was updated successfully, but these errors were encountered: