Skip to content

Commit

Permalink
Merge pull request #134 from GekkeGlennDev/update-upgrade-markdown
Browse files Browse the repository at this point in the history
Updated Upgrade.md. For replace StyleBuilder to Style since its been …
  • Loading branch information
freekmurze authored Jan 20, 2023
2 parents 9d3ff9c + e4d66fa commit bec8449
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,33 @@ To
$writer = SimpleExcelWriter::create(file: $file, delimiter: ';');
```

### Replace StyleBuilder with Style

In OpenSpout v4 the `StyleBuilder` is removed and integrated inside the `Style` class.

Update code like this...

```php
use OpenSpout\Common\Entity\Style\Style;
use OpenSpout\Writer\Common\Creator\Style\StyleBuilder;

$builder = new StyleBuilder();
$builder
->setFontBold()
->setFontName('Sans');
```

... to ...

```php
use OpenSpout\Common\Entity\Style\Style;

$style = new Style();
$style
->setFontBold()
->setFontName('Sans');
```

### Deprecated setting the type manually

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

0 comments on commit bec8449

Please sign in to comment.