Skip to content

Commit 3593446

Browse files
authored
Better deprecation message (#936)
1 parent a1f1c0e commit 3593446

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Faker/Provider/Image.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public static function imageUrl(
5555
trigger_deprecation(
5656
'fakerphp/faker',
5757
'1.20',
58-
'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
58+
'%s is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
59+
__CLASS__,
5960
);
6061

6162
// Validate image format
@@ -119,7 +120,8 @@ public static function image(
119120
trigger_deprecation(
120121
'fakerphp/faker',
121122
'1.20',
122-
'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
123+
'%s is deprecated and will no longer be available in Faker 2. Please use a custom provider instead',
124+
__CLASS__,
123125
);
124126

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

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

190194
return [

0 commit comments

Comments
 (0)