Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
@@ -30,7 +30,7 @@ class JsonManifestVersionStrategy implements VersionStrategyInterface
/**
* @param string $manifestPath Absolute path to the manifest file
*/
public function __construct($manifestPath)
public function __construct(string $manifestPath)
{
$this->manifestPath = $manifestPath;
}
@@ -50,11 +50,11 @@ class JsonManifestVersionStrategy implements VersionStrategyInterface
return $this->getManifestPath($path) ?: $path;
}
private function getManifestPath($path)
private function getManifestPath(string $path): ?string
{
if (null === $this->manifestData) {
if (!file_exists($this->manifestPath)) {
throw new \RuntimeException(sprintf('Asset manifest file "%s" does not exist.', $this->manifestPath));
throw new \RuntimeException(sprintf('Asset manifest file "%s" does not exist. Did you forget to build the assets with npm or yarn?', $this->manifestPath));
}
$this->manifestData = json_decode(file_get_contents($this->manifestPath), true);
@@ -63,6 +63,6 @@ class JsonManifestVersionStrategy implements VersionStrategyInterface
}
}
return isset($this->manifestData[$path]) ? $this->manifestData[$path] : null;
return $this->manifestData[$path] ?? null;
}
}
@@ -25,7 +25,7 @@ class StaticVersionStrategy implements VersionStrategyInterface
* @param string $version Version number
* @param string $format Url format
*/
public function __construct($version, $format = null)
public function __construct(string $version, string $format = null)
{
$this->version = $version;
$this->format = $format ?: '%s?%s';
@@ -46,7 +46,7 @@ class StaticVersionStrategy implements VersionStrategyInterface
{
$versionized = sprintf($this->format, ltrim($path, '/'), $this->getVersion($path));
if ($path && '/' == $path[0]) {
if ($path && '/' === $path[0]) {
return '/'.$versionized;
}