Ocramius / PackageVersions

:package: Composer addon to efficiently get installed packages' version numbers
MIT License
3.22k stars 67 forks source link

Add convenience functionality to streamline format of returned versions #21

Closed holtkamp closed 7 years ago

holtkamp commented 8 years ago

Currently the returned versions 'might' be in different formats, for example:

The part that I am interested in to generate an URL that points to these assets on a CDN is:

I find myself writing code like:

sprintf('//cdnjs.cloudflare.com/ajax/libs/font-awesome/%s/css/font-awesome.min.css', ltrim(current(explode('@', \PackageVersions\Versions::getVersion('bower-asset/font-awesome'))), 'v')),

maybe some convencience methods can be added to this library to:

Maybe you consider this 'out-of-scope' for this library? Was just wondering 😄

Ocramius commented 8 years ago

@holtkamp you mean like https://github.com/Ocramius/PackageVersions/pull/9 ?

holtkamp commented 8 years ago

@Ocramius , mmm, yeah, guess that would cover it. Sorry, only looked at the issues, not the PR's...

Ocramius commented 7 years ago

Closing as per https://github.com/Ocramius/PackageVersions/issues/44 and https://github.com/Ocramius/PackageVersions/issues/43