You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #52825 [AssetMapper] Upgrade asset mapper to 6.4 fails due to invalid entries "downloaded_to" and "preload" (redflo)
This PR was merged into the 6.4 branch.
Discussion
----------
[AssetMapper] Upgrade asset mapper to 6.4 fails due to invalid entries "downloaded_to" and "preload"
…s "downloaded_to" and "preload"
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | yes and no, entries were deprecated, but upgrade did not handle these
| Issues | Fix#52810
| License | MIT
Fixes errors that arise from deprecated entries "downloaded_to" and "preload" after upgrade to Symfony 6.4.
Deprecated parameters are ignored and removed whenever importmap.php is rewritten during importmap:update for example.
Tested with my personal symfony project, and resolved the issue #52810
Commits
-------
122c0c6 [AssetMapper] Upgrade asset mapper to 6.4 fails due to invalid entries "downloaded_to" and "preload"
if ($invalidKeys = array_diff(array_keys($data), $validKeys)) {
46
46
thrownew \InvalidArgumentException(sprintf('The following keys are not valid for the importmap entry "%s": "%s". Valid keys are: "%s".', $importName, implode('", "', $invalidKeys), implode('", "', $validKeys)));
47
47
}
@@ -51,6 +51,20 @@ public function getEntries(): ImportMapEntries
51
51
trigger_deprecation('symfony/asset-mapper', '6.4', 'The "url" option is deprecated, use "version" instead.');
52
52
}
53
53
54
+
// should solve itself when the config is written again
55
+
if (isset($data['downloaded_to'])) {
56
+
trigger_deprecation('symfony/asset-mapper', '6.4', 'The "downloaded_to" option is deprecated and will be removed.');
57
+
// remove deprecated downloaded_to
58
+
unset($data['downloaded_to']);
59
+
}
60
+
61
+
// should solve itself when the config is written again
62
+
if (isset($data['preload'])) {
63
+
trigger_deprecation('symfony/asset-mapper', '6.4', 'The "preload" option is deprecated, preloading is automatically done.');
0 commit comments