idea-php-symfony2-plugin icon indicating copy to clipboard operation
idea-php-symfony2-plugin copied to clipboard

AssetMapper: Support for assets-paths

Open Chris53897 opened this issue 1 year ago • 1 comments

Thanks for this great plugin.

It would be great if this plugin could support the AssetMapper feature to map the paths for the assets.

Example in a twig-file. {{ asset('apple-touch-icon.png') }}

The symfony default is, to search for assets in public/. With AssetMapper the assets are managed by default in assets/. https://symfony.com/doc/current/frontend/asset_mapper.html#framework-asset-mapper-paths

After i upgraded our projects to AssetMapper and move all the files from /public to /assets, the files could not be resolved and found anymore.

config/asset_mapper.yaml

framework:
    asset_mapper:
        # The paths to make available to the asset mapper.
        paths:
            - assets/

Proposal: Read the yaml-File and get the path mappings. Try to resolve and find assets with this mapping paths.

Chris53897 avatar Oct 07 '23 07:10 Chris53897

Yes, this would be fantastic! If there is some format in which the framework could expose the asset paths in a more systematic way to support the plugin, please let me know.

Thanks!

weaverryan avatar Dec 04 '23 20:12 weaverryan