Skip to content

Commit

Permalink
Better deprecation message
Browse files Browse the repository at this point in the history
Without searching for the deprecation message, I was not able to know what exactly is deprecated.
  • Loading branch information
OskarStark committed Jan 17, 2025
1 parent 2114cc6 commit 1b086f6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/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

0 comments on commit 1b086f6

Please sign in to comment.