Skip to content

UndefinedMagicMethod: Magic method boolean does not exist #2583

@ElisDN

Description

@ElisDN

I have fixtures with this code:

$post = new Post(
    $date,
    $faker->slug,
    $faker->sentence(4)
);

if ($faker->boolean(60)) {
    $post->publish($date);
}

And in 3.8.2 only I get errors for every usage of method boolean():

ERROR: UndefinedMagicMethod - BlogFixture.php:42:25 - Magic method Faker\Generator::boolean does not exist
if ($faker->boolean(60)) {

but other magic methods like sentence() above work correctly.

All methods are specified in Faker's PHPDoc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions