@@ -1168,9 +1168,13 @@ public static function assertNan($actual, string $message = ''): void
11681168 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
11691169 * @throws Exception
11701170 * @throws ExpectationFailedException
1171+ *
1172+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
11711173 */
11721174 public static function assertClassHasAttribute (string $ attributeName , string $ className , string $ message = '' ): void
11731175 {
1176+ self ::createWarning ('assertClassHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1177+
11741178 if (!self ::isValidClassAttributeName ($ attributeName )) {
11751179 throw InvalidArgumentException::create (1 , 'valid attribute name ' );
11761180 }
@@ -1188,9 +1192,13 @@ public static function assertClassHasAttribute(string $attributeName, string $cl
11881192 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
11891193 * @throws Exception
11901194 * @throws ExpectationFailedException
1195+ *
1196+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
11911197 */
11921198 public static function assertClassNotHasAttribute (string $ attributeName , string $ className , string $ message = '' ): void
11931199 {
1200+ self ::createWarning ('assertClassNotHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1201+
11941202 if (!self ::isValidClassAttributeName ($ attributeName )) {
11951203 throw InvalidArgumentException::create (1 , 'valid attribute name ' );
11961204 }
@@ -1214,9 +1222,13 @@ public static function assertClassNotHasAttribute(string $attributeName, string
12141222 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
12151223 * @throws Exception
12161224 * @throws ExpectationFailedException
1225+ *
1226+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
12171227 */
12181228 public static function assertClassHasStaticAttribute (string $ attributeName , string $ className , string $ message = '' ): void
12191229 {
1230+ self ::createWarning ('assertClassHasStaticAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1231+
12201232 if (!self ::isValidClassAttributeName ($ attributeName )) {
12211233 throw InvalidArgumentException::create (1 , 'valid attribute name ' );
12221234 }
@@ -1238,9 +1250,13 @@ public static function assertClassHasStaticAttribute(string $attributeName, stri
12381250 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
12391251 * @throws Exception
12401252 * @throws ExpectationFailedException
1253+ *
1254+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
12411255 */
12421256 public static function assertClassNotHasStaticAttribute (string $ attributeName , string $ className , string $ message = '' ): void
12431257 {
1258+ self ::createWarning ('assertClassNotHasStaticAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1259+
12441260 if (!self ::isValidClassAttributeName ($ attributeName )) {
12451261 throw InvalidArgumentException::create (1 , 'valid attribute name ' );
12461262 }
@@ -1266,9 +1282,13 @@ public static function assertClassNotHasStaticAttribute(string $attributeName, s
12661282 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
12671283 * @throws Exception
12681284 * @throws ExpectationFailedException
1285+ *
1286+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
12691287 */
12701288 public static function assertObjectHasAttribute (string $ attributeName , $ object , string $ message = '' ): void
12711289 {
1290+ self ::createWarning ('assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1291+
12721292 if (!self ::isValidObjectAttributeName ($ attributeName )) {
12731293 throw InvalidArgumentException::create (1 , 'valid attribute name ' );
12741294 }
@@ -1292,9 +1312,13 @@ public static function assertObjectHasAttribute(string $attributeName, $object,
12921312 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
12931313 * @throws Exception
12941314 * @throws ExpectationFailedException
1315+ *
1316+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
12951317 */
12961318 public static function assertObjectNotHasAttribute (string $ attributeName , $ object , string $ message = '' ): void
12971319 {
1320+ self ::createWarning ('assertObjectNotHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
1321+
12981322 if (!self ::isValidObjectAttributeName ($ attributeName )) {
12991323 throw InvalidArgumentException::create (1 , 'valid attribute name ' );
13001324 }
@@ -2668,18 +2692,33 @@ public static function greaterThanOrEqual($value): LogicalOr
26682692 );
26692693 }
26702694
2695+ /**
2696+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
2697+ */
26712698 public static function classHasAttribute (string $ attributeName ): ClassHasAttribute
26722699 {
2700+ self ::createWarning ('classHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
2701+
26732702 return new ClassHasAttribute ($ attributeName );
26742703 }
26752704
2705+ /**
2706+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
2707+ */
26762708 public static function classHasStaticAttribute (string $ attributeName ): ClassHasStaticAttribute
26772709 {
2710+ self ::createWarning ('classHasStaticAttribute() is deprecated and will be removed in PHPUnit 10. ' );
2711+
26782712 return new ClassHasStaticAttribute ($ attributeName );
26792713 }
26802714
2715+ /**
2716+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601
2717+ */
26812718 public static function objectHasAttribute ($ attributeName ): ObjectHasAttribute
26822719 {
2720+ self ::createWarning ('objectHasAttribute() is deprecated and will be removed in PHPUnit 10. ' );
2721+
26832722 return new ObjectHasAttribute ($ attributeName );
26842723 }
26852724
0 commit comments