bezoerb / filerevbundle Goto Github PK
View Code? Open in Web Editor NEWProvides a configurable filerev strategy for your symfony2 project
Provides a configurable filerev strategy for your symfony2 project
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).
Use case
3rd-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:
framework:
assets:
packages:
mad:
base_path: /assets
Problem
Prefixing 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.
Any help is highly appreciated. Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.