Skip to content

Commit b6597b6

Browse files
committed
[AssetMapper] minor fixes for pre-compression
1 parent 4612ff2 commit b6597b6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Symfony/Component/AssetMapper/Compressor/GzipCompressor.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
final class GzipCompressor implements SupportedCompressorInterface
2323
{
2424
use CompressorTrait {
25-
compress as baseCompress;
25+
compress as private baseCompress;
26+
getUnsupportedReason as private baseGetUnsupportedReason;
2627
}
2728

2829
private const WRAPPER = 'compress.zlib';
@@ -51,6 +52,15 @@ public function compress(string $path): void
5152
$this->baseCompress($path);
5253
}
5354

55+
public function getUnsupportedReason(): ?string
56+
{
57+
if (null === $this->zopfliCompressor->getUnsupportedReason()) {
58+
return null;
59+
}
60+
61+
return $this->baseGetUnsupportedReason();
62+
}
63+
5464
/**
5565
* @return resource
5666
*/

0 commit comments

Comments
 (0)