Skip to content

Better deprecation message #936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/Faker/Provider/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public static function imageUrl(
trigger_deprecation(
'fakerphp/faker',
'1.20',
'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
'%s is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
__CLASS__,
);

// Validate image format
Expand Down Expand Up @@ -119,7 +120,8 @@ public static function image(
trigger_deprecation(
'fakerphp/faker',
'1.20',
'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
'%s is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
__CLASS__,
);

$dir = null === $dir ? sys_get_temp_dir() : $dir; // GNU/Linux / OS X / Windows compatible
Expand Down Expand Up @@ -173,7 +175,8 @@ public static function getFormats(): array
trigger_deprecation(
'fakerphp/faker',
'1.20',
'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
'%s is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
__CLASS__,
);

return array_keys(static::getFormatConstants());
Expand All @@ -184,7 +187,8 @@ public static function getFormatConstants(): array
trigger_deprecation(
'fakerphp/faker',
'1.20',
'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
'%s is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
__CLASS__,
);

return [
Expand Down
Loading