diff --git a/composer.json b/composer.json index ddb841d..fd445b1 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/AssetsMiddleware.php b/src/AssetsMiddleware.php index a3d462a..342c307 100644 --- a/src/AssetsMiddleware.php +++ b/src/AssetsMiddleware.php @@ -36,7 +36,6 @@ use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\MiddlewareInterface; use Psr\Http\Server\RequestHandlerInterface; -use Ramsey\Uuid\Uuid; /** @@ -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; } /**