I would guess it might be the implementation of Faker's text helper - it generates random words and joins them into a string. Try replacing that description value with a string literal until Faker supports PHP 7.4
Dec 3, 2019
7
Level 36
Laravel 6 and php 7.4 seeding problem
I update to php 7.4 and in mine laravel 6 project when I seed a class I get this error:
ErrorException : implode(): Passing glue string after array is deprecated. Swap the parameters
This is my 'problematic' factory class:
$factory->define(Complaint::class, function (Faker $faker) {
return [
'date' => Carbon::parse($faker->dateTimeBetween('-5 years', 'now'))->format('d.m.Y'),
'type_of_complaint_id' => TypeOfComplaint::inRandomOrder()->first()->id,
'center_id' => Center::inRandomOrder()->first()->id,
'complainant' => $faker->name,
'description' => $faker->text(50),
'created_by' => User::inRandomOrder()->first()->id,
'updated_by' => User::inRandomOrder()->first()->id,
];
});
What could be a problem?
Level 104
Please or to participate in this conversation.