alexpts / symfony-asset-strategy-last-modify
Strategy for symfony asset component
Installs: 4 390
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: ^7.1
- symfony/asset: ^3.3|^4.0
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: ^6.2
This package is auto-updated.
Last update: 2024-10-15 02:35:55 UTC
README
Strategy for symfony assets component
Strategy for symfony assets component for get version from last modify file time.
Installation
$ composer require alexpts/symfony-asset-strategy-last-modify
Demo
$package = new Package(new LastModifyStrategy($assertDirPath)); $url = $package->getUrl('/jquery.js'); // /jquery.js?v=1472155706
With CDN
$package = new Package(new LastModifyStrategy($assertDirPath, 'cdn.host.org')); $url = $package->getUrl('/jquery.js'); // //cdn.host.org/jquery.js?v=1472155706