Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update excel migration with sets() method #2861

Merged
merged 1 commit into from
May 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update excel migration with sets() method
TomasVotruba authored May 31, 2022
commit 6a5a668ad29b425afd379961a3c42ecfe8dce4f6
26 changes: 24 additions & 2 deletions docs/topics/migration-from-PHPExcel.md
Original file line number Diff line number Diff line change
@@ -14,8 +14,30 @@ in `src/`, you can run the migration like so:

```sh
composer require rector/rector --dev
vendor/bin/rector process src --set phpexcel-to-phpspreadsheet
composer remove rector/rector

# this creates rector.php config
vendor/bin/rector init
```

Add `PHPOfficeSetList` set to `rector.php`

```php
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\PHPOffice\Set\PHPOfficeSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
PHPOfficeSetList::PHPEXCEL_TO_PHPSPREADSHEET
]);
};
```

And run Rector on your code:

```sh
vendor/bin/rector process src
```

For more details, see