Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
reverting to sha1 as dir keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Joan Fabrégat committed Oct 8, 2018
1 parent 123d3cd commit f3d3557
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"codeinc/psr7-responses": "^2",
"matthiasmullie/minify": "^1.3",
"codeinc/media-types": "^1.0",
"enshrined/svg-sanitize": "^0.8.2",
"ramsey/uuid": "^3.8"
"enshrined/svg-sanitize": "^0.8.2"
},
"require-dev": {
"phpunit/phpunit": "^7",
Expand Down
3 changes: 1 addition & 2 deletions src/AssetsMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Ramsey\Uuid\Uuid;


/**
Expand Down Expand Up @@ -111,7 +110,7 @@ public function addAssetsDirectory(string $directoryPath, string $directoryKey =
if ($directoryKey !== null && empty($directoryKey)) {
throw new EmptyDirectoryKeyException($directoryPath);
}
$this->assetsDirectories[$directoryKey ?? Uuid::uuid4()->toString()] = $directoryPath;
$this->assetsDirectories[$directoryKey ?? hash('sha1', $directoryPath)] = $directoryPath;
}

/**
Expand Down

0 comments on commit f3d3557

Please sign in to comment.