Skip to content

Commit 814d923

Browse files
committed
[CLEANUP] Deprecate DeclarationBlock::expandShorthands
The `expandShorthands`/`createShorthands` Functions are deprecated and will be removed without substitution in version 10.0. Expanding and creating the shorthand notation is out of the scope of this library. If you want to include this functionality in your project or build it into a separate package, get the code from the v8.5.1 version of this library. Signed-off-by: Daniel Ziegenberg <[email protected]>
1 parent 55e7f21 commit 814d923

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1818

1919
### Deprecated
2020

21+
- `DeclarationBlock::expandShorthands()` is deprecated and will be removed without substitution in version 10.0.
22+
2123
### Removed
2224

2325
- Drop support for PHP < 7.2 (#420)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,10 @@ classDiagram
801801

802802
The latest pre-PSR-0 version of this project can be checked with the `0.9.0` tag.
803803

804+
The `expandShorthands`/`createShorthands` Functions are deprecated and will be removed without substitution in version 10.0.
805+
Expanding and creating the shorthand notation is out of the scope of this library. If you want to include this functionality
806+
in your project or build it into a separate package, get the code from the v8.5.1 version of this library.
807+
804808
### Running Tests
805809

806810
To run all continuous integration (CI) checks for this project (including unit tests),

src/RuleSet/DeclarationBlock.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,13 @@ public function getSelectors()
181181
* Splits shorthand declarations (e.g. `margin` or `font`) into their constituent parts.
182182
*
183183
* @return void
184+
*
185+
* @deprecated This will be removed without substitution in version 10.0.
184186
*/
185187
public function expandShorthands()
186188
{
187-
// border must be expanded before dimensions
188-
$this->expandBorderShorthand();
189-
$this->expandDimensionsShorthand();
190-
$this->expandFontShorthand();
191-
$this->expandBackgroundShorthand();
192-
$this->expandListStyleShorthand();
189+
trigger_error("Expanding Shorthands will be removed without substitution in version 10.0.");
190+
return;
193191
}
194192

195193
/**

0 commit comments

Comments
 (0)