{"action":"opened","issue":{"url":"https://api.github.com/repos/bezoerb/FilerevBundle/issues/1","repository_url":"https://api.github.com/repos/bezoerb/FilerevBundle","labels_url":"https://api.github.com/repos/bezoerb/FilerevBundle/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/bezoerb/FilerevBundle/issues/1/comments","events_url":"https://api.github.com/repos/bezoerb/FilerevBundle/issues/1/events","html_url":"https://github.com/bezoerb/FilerevBundle/issues/1","id":146627778,"number":1,"title":"asset packages not supported","user":{"login":"MichaelKubovic","id":1603975,"avatar_url":"https://avatars.githubusercontent.com/u/1603975?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelKubovic","html_url":"https://github.com/MichaelKubovic","followers_url":"https://api.github.com/users/MichaelKubovic/followers","following_url":"https://api.github.com/users/MichaelKubovic/following{/other_user}","gists_url":"https://api.github.com/users/MichaelKubovic/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelKubovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelKubovic/subscriptions","organizations_url":"https://api.github.com/users/MichaelKubovic/orgs","repos_url":"https://api.github.com/users/MichaelKubovic/repos","events_url":"https://api.github.com/users/MichaelKubovic/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelKubovic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-07T13:36:43Z","updated_at":"2016-04-07T13:36:43Z","closed_at":null,"body":"Hi Ben, I'm working on a PR to support custom asset packages however I've encountered an issue related to base_path (not just for custom packages).\r\n\r\n**Use case**\r\n3rd-party bundles use default package, nothing special here. My front-end bundle, uses package with different basePath. This could possibly be also a CDN base_url for my front-end assets. Resources retrieved with ``` {{ asset('css/style.css', 'mad') }}``` are then prefixed with the path configured for \"mad\" package. The configuration is straightforward:\r\n\r\n```yaml\r\nframework:\r\n    assets:\r\n        packages:\r\n            mad:\r\n                base_path: /assets\r\n```\r\n\r\n**Problem**\r\nPrefixing the base_path! In the old codebase you've had ```$file = $this->basePath . '/' . $path;``` in applyVersion() method of PathPackage. Currently, the responsibility for prefixing is left on Asset component (what I think is in tact with Symfony's intention when introducing VersionStrategyInterface) and so the path that comes to applyVersion() as an argument is un-prefixed. This however causes ```if (file_exists($absReved))``` to fail because the path is incorrect - it lacks the prefix. This obviously results into unmatched entry in catalogue as well.\r\n\r\nAny help is highly appreciated. Thanks."}}