Skip to content

Commit c8c446c

Browse files
committed
[BUGFIX] Create Size with correct types in expandBackgroundShorthand
This is the v8.x backport of #814.
1 parent 6f37a7a commit c8c446c

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1515

1616
### Fixed
1717

18+
- Create `Size` with correct types in `expandBackgroundShorthand` (#814)
1819
- Parse `@font-face` `src` property as comma-delimited list (#794)
1920

2021
## 8.7.0: Add support for PHP 8.4

config/phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,3 @@ parameters:
55
count: 2
66
path: ../src/OutputFormat.php
77

8-
-
9-
message: "#^Class Sabberworm\\\\CSS\\\\Value\\\\Size constructor invoked with 5 parameters, 1\\-4 required\\.$#"
10-
count: 2
11-
path: ../src/RuleSet/DeclarationBlock.php
12-

src/RuleSet/DeclarationBlock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ public function expandBackgroundShorthand()
432432
'background-repeat' => ['repeat'],
433433
'background-attachment' => ['scroll'],
434434
'background-position' => [
435-
new Size(0, '%', null, false, $this->iLineNo),
436-
new Size(0, '%', null, false, $this->iLineNo),
435+
new Size(0, '%', false, $this->iLineNo),
436+
new Size(0, '%', false, $this->iLineNo),
437437
],
438438
];
439439
$mRuleValue = $oRule->getValue();

0 commit comments

Comments
 (0)