idea-php-symfony2-plugin
idea-php-symfony2-plugin copied to clipboard
AssetMapper: Support for assets-paths
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.
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!