grixu / data-factories
Simple DTOs factories
Installs: 1 397
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 6
Requires
- php: ^8.0
- illuminate/support: ^9.0
Requires (Dev)
- brainmaestro/composer-git-hooks: ^v3.0.0-alpha.1
- friendsofphp/php-cs-fixer: ^3.1
- nunomaduro/larastan: ^1.0.0
- nunomaduro/phpinsights: ^2.0
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.4
- spatie/x-ray: ^1.1
- dev-main
- 2.0.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- dev-dependabot/github_actions/shivammathur/setup-php-2.23.0
- dev-dependabot/github_actions/8398a7/action-slack-3.15.0
- dev-dependabot/github_actions/dependabot/fetch-metadata-1.3.5
- dev-dependabot/github_actions/actions/cache-3.0.11
- dev-dependabot/github_actions/actions/checkout-3.1.0
- dev-dependabot/composer/nunomaduro/larastan-tw-1.0.0or-tw-2.0.0
This package is auto-updated.
Last update: 2023-01-26 01:16:34 UTC
README
Simple factories for DTO (spatie/data-transfer-objects
) and DTO Collections.
Installation
You can install the package via composer:
composer require grixu/data-factories
Usage
use Grixu\DataFactories\Factory; class CustomerDataFactory extends Factory { public function create(array $parameters = []): CustomerData { return new CustomerData( $parameters + [ 'name' => 'Testowy klient', 'country' => 'PL', 'postalCode' => '87-100', 'city' => 'Toruń', 'vatNumber' => '9562338798', 'street' => 'Polna 140B', 'voivodeship' => 'Kujawsko-pomorskie', 'district' => 'Toruń', 'paymentPeriod' => 15, 'syncTs' => now(), 'updatedAt' => now(), 'xlId' => 1, 'xlOperatorId' => 1, ] ); } }
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email mateusz.gostanski@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.