Addressed a range of deprecation warnings

Closes #3969
This commit is contained in:
Dan Brown
2023-01-21 20:50:04 +00:00
parent 28dda39260
commit 78ebcb6f38
17 changed files with 33 additions and 27 deletions

View File

@ -21,7 +21,7 @@ class TagFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->city,
'name' => $this->faker->city(),
'value' => $this->faker->sentence(3),
];
}

View File

@ -18,7 +18,7 @@ class WebhookFactory extends Factory
{
return [
'name' => 'My webhook for ' . $this->faker->country(),
'endpoint' => $this->faker->url,
'endpoint' => $this->faker->url(),
'active' => true,
'timeout' => 3,
];

View File

@ -22,11 +22,11 @@ class UserFactory extends Factory
*/
public function definition()
{
$name = $this->faker->name;
$name = $this->faker->name();
return [
'name' => $name,
'email' => $this->faker->email,
'email' => $this->faker->email(),
'slug' => Str::slug($name . '-' . Str::random(5)),
'password' => Str::random(10),
'remember_token' => Str::random(10),

View File

@ -22,9 +22,9 @@ class BookFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->sentence,
'name' => $this->faker->sentence(),
'slug' => Str::random(10),
'description' => $this->faker->paragraph,
'description' => $this->faker->paragraph(),
];
}
}

View File

@ -22,9 +22,9 @@ class ChapterFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->sentence,
'name' => $this->faker->sentence(),
'slug' => Str::random(10),
'description' => $this->faker->paragraph,
'description' => $this->faker->paragraph(),
];
}
}

View File

@ -24,7 +24,7 @@ class PageFactory extends Factory
$html = '<p>' . implode('</p>', $this->faker->paragraphs(5)) . '</p>';
return [
'name' => $this->faker->sentence,
'name' => $this->faker->sentence(),
'slug' => Str::random(10),
'html' => $html,
'text' => strip_tags($html),

View File

@ -21,9 +21,9 @@ class ImageFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->slug . '.jpg',
'url' => $this->faker->url,
'path' => $this->faker->url,
'name' => $this->faker->slug() . '.jpg',
'url' => $this->faker->url(),
'path' => $this->faker->url(),
'type' => 'gallery',
'uploaded_to' => 0,
];