Releases: MathiasReker/php-svg-optimizer
Releases · MathiasReker/php-svg-optimizer
8.2.3
Full Changelog: 8.2.2...8.2.3
8.2.2
Full Changelog: 8.2.1...8.2.2
8.2.1
Full Changelog: 8.2.0...8.2.1
8.2.0
Full Changelog: 8.1.0...8.2.0
8.1.0
Full Changelog: 8.0.3...8.1.0
8.0.3
Full Changelog: 8.0.2...8.0.3
8.0.2
Full Changelog: 8.0.1...8.0.2
8.0.1
Full Changelog: 7.3.0...8.0.1
8.0.0
Breaking Changes (BC)
BC 1: Default Rules Are No Longer Applied Automatically
Previously, some optimization rules were applied by default. Now, no rules are applied automatically. You must explicitly enable them either by specifying them as before or with the new --with-all-rules flag or withAllRules() method.
$svgOptimizer = SvgOptimizerFacade::fromFile('path/to/source.svg')
->withAllRules()
->optimize()
->saveToFile('path/to/output.svg');BC 2: Risky Rules Require Explicit Permission
Risky rules are no longer allowed without the --alow-risky flag or allowRisky() method. You must explicitly enable them.
$svgOptimizer = SvgOptimizerFacade::fromFile('path/to/source.svg')
->withRules(
removeWidthHeightAttributes: true,
removeUnsafeElements: true,
)
->allowRisky()
->optimize()
->saveToFile('path/to/output.svg');Full Changelog: 7.3.0...8.0
7.3.0
Full Changelog: 7.2.0...7.3.0