Skip to content

Commit

Permalink
Remove invalid config reference in README.md (#577)
Browse files Browse the repository at this point in the history
* Remove invalid config reference in README

* Fix: Expand example

Co-authored-by: Andreas Möller <am@localheinz.com>
  • Loading branch information
pierredup and localheinz authored Dec 13, 2022
1 parent 92efad6 commit 33afadf
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,18 @@ to run `rector/rector`.

*Note:* do not forget to replace `src/` with the path to your source directory.

Another way is to use it in your `rector.php` file:
Alternatively, import the configuration in your `rector.php` file:

```php
$rectorConfig->import('vendor/fakerphp/faker/rector-migrate.php');
$faker($rectorConfig);
<?php

declare(strict_types=1);

use Rector\Config;

return static function (Config\RectorConfig $rectorConfig): void {
$rectorConfig->import('vendor/fakerphp/faker/rector-migrate.php');
};
```

## License
Expand Down

0 comments on commit 33afadf

Please # to comment.