-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected
6.4
Description
MappedAssetFactory->isVendor()
return true
when the directory is missing, which leads to unexpected behaviours.
For some reason, str_starts_with('/app/assets/javascript/site_chart.js', null)
returns true
, so AssetMapper thinks that one file is in the vendor/
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?) , but assets/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.