Skip to content

swisnl/phpstan-faker

Repository files navigation

PHPStan Faker Provider Extension

Latest Version on Packagist Software License Buy us a tree Total Downloads Maintained by SWIS

This PHPStan Reflection Extension can automatically register the methods and properties created by custom Faker providers, so you don't need to instruct PHPStan to ignore the usage of those methods.

Installation

Via Composer

composer require --dev swisnl/phpstan-faker

If you also have phpstan/extension-installer installed, then you don't need to follow the instructions for manual installation. Regardless of the installation method, you need to follow the instructions for configuration.

Manual installation

If you don't want to use phpstan/extension-installer, include extension.neon in your project's PHPStan config:

includes:
    - vendor/swisnl/phpstan-faker/extension.neon

Configuration

Add the custom faker provider classes to the extension configuration.

parameters:
    faker:
        providerClasses:
            - App\Faker\MyProvider

This does not actually register the custom providers in Faker, this just tells PHPStan about the custom providers.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email security@swis.nl instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

SWIS ❤️ Open Source

SWIS is a web agency from Leiden, the Netherlands. We love working with open source software.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages