Aggiornato Composer

This commit is contained in:
Paolo A
2024-05-17 12:24:19 +00:00
parent 4ac62108b5
commit ec201d75b2
2238 changed files with 38684 additions and 59785 deletions

View File

@@ -15,7 +15,7 @@ It's heavily inspired by Perl's [Data::Faker](https://metacpan.org/pod/Data::Fak
### Installation
Faker requires PHP >= 7.1.
Faker requires PHP >= 7.4.
```shell
composer require fakerphp/faker
@@ -57,6 +57,44 @@ for ($i = 0; $i < 3; $i++) {
// 'Orlo Bergstrom'
```
## Automated refactoring
If you already used this library with its properties, they are now deprecated and needs to be replaced by their equivalent methods.
You can use the provided [Rector](https://github.com/rectorphp/rector) config file to automate the work.
Run
```bash
composer require --dev rector/rector
```
to install `rector/rector`.
Run
```bash
vendor/bin/rector process src/ --config vendor/fakerphp/faker/rector-migrate.php
```
to run `rector/rector`.
*Note:* do not forget to replace `src/` with the path to your source directory.
Alternatively, import the configuration in your `rector.php` file:
```php
<?php
declare(strict_types=1);
use Rector\Config;
return static function (Config\RectorConfig $rectorConfig): void {
$rectorConfig->import('vendor/fakerphp/faker/rector-migrate.php');
};
```
## License
Faker is released under the MIT License. See [`LICENSE`](LICENSE) for details.