Skip to content

Commit bec8449

Browse files
authored
Merge pull request #134 from GekkeGlennDev/update-upgrade-markdown
Updated Upgrade.md. For replace StyleBuilder to Style since its been …
2 parents 9d3ff9c + e4d66fa commit bec8449

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

UPGRADE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,33 @@ To
3030
$writer = SimpleExcelWriter::create(file: $file, delimiter: ';');
3131
```
3232

33+
### Replace StyleBuilder with Style
34+
35+
In OpenSpout v4 the `StyleBuilder` is removed and integrated inside the `Style` class.
36+
37+
Update code like this...
38+
39+
```php
40+
use OpenSpout\Common\Entity\Style\Style;
41+
use OpenSpout\Writer\Common\Creator\Style\StyleBuilder;
42+
43+
$builder = new StyleBuilder();
44+
$builder
45+
->setFontBold()
46+
->setFontName('Sans');
47+
```
48+
49+
... to ...
50+
51+
```php
52+
use OpenSpout\Common\Entity\Style\Style;
53+
54+
$style = new Style();
55+
$style
56+
->setFontBold()
57+
->setFontName('Sans');
58+
```
59+
3360
### Deprecated setting the type manually
3461

3562
In v4 of openspout/openspout it is no longer possible to explicitly set the type.

0 commit comments

Comments
 (0)