Skip to content

Commit 1f3942d

Browse files
Review feedback
1 parent 47d08ac commit 1f3942d

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

Zend/tests/attributes/constants/constant_listed_as_target-internal.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Constants listed in valid targets when used wrong (internal attribute)
33
--FILE--
44
<?php
55

6-
#[Deprecated]
76
function demo(
87
#[Deprecated] $v
98
) {}

Zend/tests/attributes/delayed_target_validation/validator_Deprecated.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ array(2) {
6666
string(10) "Deprecated"
6767
}
6868
}
69-
Error: Cannot apply #[Deprecated] to interface DemoInterface
69+
Error: Cannot apply #[\Deprecated] to interface DemoInterface
7070
********************
7171
Class [ <user> class DemoClass ] {
7272
@@ %s %d-%d
@@ -99,7 +99,7 @@ array(2) {
9999
string(10) "Deprecated"
100100
}
101101
}
102-
Error: Cannot apply #[Deprecated] to class DemoClass
102+
Error: Cannot apply #[\Deprecated] to class DemoClass
103103
********************
104104
Enum [ <user> enum DemoEnum implements UnitEnum ] {
105105
@@ %s %d-%d
@@ -139,4 +139,4 @@ array(2) {
139139
string(10) "Deprecated"
140140
}
141141
}
142-
Error: Cannot apply #[Deprecated] to enum DemoEnum
142+
Error: Cannot apply #[\Deprecated] to enum DemoEnum

Zend/tests/attributes/deprecated/traits/class_not_trait.phpt renamed to Zend/tests/attributes/deprecated/error_on_class.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ class Demo {}
88

99
?>
1010
--EXPECTF--
11-
Fatal error: Cannot apply #[Deprecated] to class Demo in %s on line %d
11+
Fatal error: Cannot apply #[\Deprecated] to class Demo in %s on line %d

Zend/tests/attributes/deprecated/traits/enum_not_trait.phpt renamed to Zend/tests/attributes/deprecated/error_on_enum.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ enum Demo {}
88

99
?>
1010
--EXPECTF--
11-
Fatal error: Cannot apply #[Deprecated] to enum Demo in %s on line %d
11+
Fatal error: Cannot apply #[\Deprecated] to enum Demo in %s on line %d

Zend/tests/attributes/deprecated/traits/interface_not_trait.phpt renamed to Zend/tests/attributes/deprecated/error_on_interface.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ interface Demo {}
88

99
?>
1010
--EXPECTF--
11-
Fatal error: Cannot apply #[Deprecated] to interface Demo in %s on line %d
11+
Fatal error: Cannot apply #[\Deprecated] to interface Demo in %s on line %d

Zend/zend_attributes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static zend_string *validate_deprecated(
121121
}
122122
if (!(scope->ce_flags & ZEND_ACC_TRAIT)) {
123123
const char *type = zend_get_object_type_case(scope, false);
124-
return zend_strpprintf(0, "Cannot apply #[Deprecated] to %s %s", type, ZSTR_VAL(scope->name));
124+
return zend_strpprintf(0, "Cannot apply #[\\Deprecated] to %s %s", type, ZSTR_VAL(scope->name));
125125
}
126126

127127
scope->ce_flags |= ZEND_ACC_DEPRECATED;

0 commit comments

Comments
 (0)