mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
nicer key
This commit is contained in:
parent
909bee8101
commit
d3c2fa897c
@ -44,8 +44,7 @@ class VersionProvider
|
|||||||
*/
|
*/
|
||||||
public function getVersion()
|
public function getVersion()
|
||||||
{
|
{
|
||||||
$key = sprintf('%s-%s', $this->getComposerLockPath(), 'all');
|
$key = sprintf('%s_%s', preg_replace("/[^A-Za-z0-9]/", '', $this->getComposerLockPath()), 'all');
|
||||||
$key = preg_replace("/[^A-Za-z0-9]/", '', $key);
|
|
||||||
$version = $this->getCachedValue($key);
|
$version = $this->getCachedValue($key);
|
||||||
if ($version) {
|
if ($version) {
|
||||||
return $version;
|
return $version;
|
||||||
@ -81,8 +80,7 @@ class VersionProvider
|
|||||||
*/
|
*/
|
||||||
public function getModuleVersion(string $module): string
|
public function getModuleVersion(string $module): string
|
||||||
{
|
{
|
||||||
$key = sprintf('%s-%s', $this->getComposerLockPath(), $module);
|
$key = sprintf('%s_%s', preg_replace("/[^A-Za-z0-9]/", '', $this->getComposerLockPath()), $module);
|
||||||
$key = preg_replace("/[^A-Za-z0-9]/", '', $key);
|
|
||||||
$version = $this->getCachedValue($key);
|
$version = $this->getCachedValue($key);
|
||||||
if ($version) {
|
if ($version) {
|
||||||
return $version;
|
return $version;
|
||||||
|
Loading…
Reference in New Issue
Block a user