Closed
Description
Symfony version(s) affected: 4.3 Symfony Asset component
Description
Symfony Asset JsonManifestVersionStrategy doesn't work with UrlPackage.
How to reproduce
I'm creating a MediaWiki Skin and the CSS is generated from https://invent.kde.org/websites/aether-sass using Symfony Encore. The code is:
$urlPackage = new UrlPackage(
'https://cdn.kde.org/',
new JsonManifestVersionStrategy('https://cdn.kde.org/aether-devel/version/manifest.json')
);
$out->addStyle( $urlPackage->getUrl('aether-devel/version/bootstrap.css'), 'all' );
Possible Solution
I created a potential patch: https://invent.kde.org/websites/aether-mediawiki/blob/master/JsonManifestNetworkStrategy.php that remove the check that the file exist and instead check if file_get_contents($this->manifestPath)
returned something. If this solution is good enough to be accepted, I will create a pull request :)
PS: I hope it's the right place to report a bug in Symfony component