Skip to content

Commit 0a44b87

Browse files
committed
bug symfony#59130 [AssetMapper] minor fixes for pre-compression (dunglas)
This PR was merged into the 7.3 branch. Discussion ---------- [AssetMapper] minor fixes for pre-compression | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | symfony#59020 (review) | License | MIT Fixes `@stof`'s comments. Commits ------- b6597b6 [AssetMapper] minor fixes for pre-compression
2 parents 4612ff2 + b6597b6 commit 0a44b87

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)