Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Symfony Asset JsonManifestVersionStrategy doesn't work with UrlPackage.  #33001

Copy link
Copy link
Closed
@CarlSchwan

Description

@CarlSchwan
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.