@@ -1168,9 +1168,13 @@ public static function assertNan($actual, string $message = ''): void
1168
1168
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1169
1169
* @throws Exception
1170
1170
* @throws ExpectationFailedException
1171
+ *
1172
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
1171
1173
*/
1172
1174
public static function assertClassHasAttribute (string $ attributeName , string $ className , string $ message = '' ): void
1173
1175
{
1176
+ self ::createWarning ('assertClassHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1177
+
1174
1178
if (!self ::isValidClassAttributeName ($ attributeName )) {
1175
1179
throw InvalidArgumentException::create (1 , 'valid attribute name ' );
1176
1180
}
@@ -1188,9 +1192,13 @@ public static function assertClassHasAttribute(string $attributeName, string $cl
1188
1192
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1189
1193
* @throws Exception
1190
1194
* @throws ExpectationFailedException
1195
+ *
1196
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
1191
1197
*/
1192
1198
public static function assertClassNotHasAttribute (string $ attributeName , string $ className , string $ message = '' ): void
1193
1199
{
1200
+ self ::createWarning ('assertClassNotHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1201
+
1194
1202
if (!self ::isValidClassAttributeName ($ attributeName )) {
1195
1203
throw InvalidArgumentException::create (1 , 'valid attribute name ' );
1196
1204
}
@@ -1214,9 +1222,13 @@ public static function assertClassNotHasAttribute(string $attributeName, string
1214
1222
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1215
1223
* @throws Exception
1216
1224
* @throws ExpectationFailedException
1225
+ *
1226
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
1217
1227
*/
1218
1228
public static function assertClassHasStaticAttribute (string $ attributeName , string $ className , string $ message = '' ): void
1219
1229
{
1230
+ self ::createWarning ('assertClassHasStaticAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1231
+
1220
1232
if (!self ::isValidClassAttributeName ($ attributeName )) {
1221
1233
throw InvalidArgumentException::create (1 , 'valid attribute name ' );
1222
1234
}
@@ -1238,9 +1250,13 @@ public static function assertClassHasStaticAttribute(string $attributeName, stri
1238
1250
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1239
1251
* @throws Exception
1240
1252
* @throws ExpectationFailedException
1253
+ *
1254
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
1241
1255
*/
1242
1256
public static function assertClassNotHasStaticAttribute (string $ attributeName , string $ className , string $ message = '' ): void
1243
1257
{
1258
+ self ::createWarning ('assertClassNotHasStaticAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1259
+
1244
1260
if (!self ::isValidClassAttributeName ($ attributeName )) {
1245
1261
throw InvalidArgumentException::create (1 , 'valid attribute name ' );
1246
1262
}
@@ -1266,9 +1282,13 @@ public static function assertClassNotHasStaticAttribute(string $attributeName, s
1266
1282
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1267
1283
* @throws Exception
1268
1284
* @throws ExpectationFailedException
1285
+ *
1286
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
1269
1287
*/
1270
1288
public static function assertObjectHasAttribute (string $ attributeName , $ object , string $ message = '' ): void
1271
1289
{
1290
+ self ::createWarning ('assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1291
+
1272
1292
if (!self ::isValidObjectAttributeName ($ attributeName )) {
1273
1293
throw InvalidArgumentException::create (1 , 'valid attribute name ' );
1274
1294
}
@@ -1292,9 +1312,13 @@ public static function assertObjectHasAttribute(string $attributeName, $object,
1292
1312
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1293
1313
* @throws Exception
1294
1314
* @throws ExpectationFailedException
1315
+ *
1316
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
1295
1317
*/
1296
1318
public static function assertObjectNotHasAttribute (string $ attributeName , $ object , string $ message = '' ): void
1297
1319
{
1320
+ self ::createWarning ('assertObjectNotHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1321
+
1298
1322
if (!self ::isValidObjectAttributeName ($ attributeName )) {
1299
1323
throw InvalidArgumentException::create (1 , 'valid attribute name ' );
1300
1324
}
@@ -2668,18 +2692,33 @@ public static function greaterThanOrEqual($value): LogicalOr
2668
2692
);
2669
2693
}
2670
2694
2695
+ /**
2696
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
2697
+ */
2671
2698
public static function classHasAttribute (string $ attributeName ): ClassHasAttribute
2672
2699
{
2700
+ self ::createWarning ('classHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
2701
+
2673
2702
return new ClassHasAttribute ($ attributeName );
2674
2703
}
2675
2704
2705
+ /**
2706
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
2707
+ */
2676
2708
public static function classHasStaticAttribute (string $ attributeName ): ClassHasStaticAttribute
2677
2709
{
2710
+ self ::createWarning ('classHasStaticAttribute() is deprecated and will be removed in PHPUnit 10. ' );
2711
+
2678
2712
return new ClassHasStaticAttribute ($ attributeName );
2679
2713
}
2680
2714
2715
+ /**
2716
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
2717
+ */
2681
2718
public static function objectHasAttribute ($ attributeName ): ObjectHasAttribute
2682
2719
{
2720
+ self ::createWarning ('objectHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
2721
+
2683
2722
return new ObjectHasAttribute ($ attributeName );
2684
2723
}
2685
2724
0 commit comments