Skip to content

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

@CarlSchwan

Description

@CarlSchwan

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy