Skip to content

Commit 5b8a532

Browse files
committed
Tweak get/set-only hook error messages
Fixes GH-19845 Closes GH-19916
1 parent 595eb04 commit 5b8a532

File tree

12 files changed

+15
-15
lines changed

12 files changed

+15
-15
lines changed

Zend/tests/asymmetric_visibility/virtual_get_only.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ class Foo {
1111

1212
?>
1313
--EXPECTF--
14-
Fatal error: Read-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d
14+
Fatal error: get-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d

Zend/tests/asymmetric_visibility/virtual_set_only.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ class Foo {
1111

1212
?>
1313
--EXPECTF--
14-
Fatal error: Write-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d
14+
Fatal error: set-only virtual property Foo::$bar must not specify asymmetric visibility in %s on line %d

Zend/tests/property_hooks/bug001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ try {
2727
?>
2828
--EXPECT--
2929
bool(true)
30-
Property C::$x is read-only
30+
Cannot write to get-only virtual property C::$x

Zend/tests/property_hooks/bug008.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $foo->bar = 'bar';
1818

1919
?>
2020
--EXPECTF--
21-
Fatal error: Uncaught Error: Property Foo::$bar is read-only in %s:%d
21+
Fatal error: Uncaught Error: Cannot write to get-only virtual property Foo::$bar in %s:%d
2222
Stack trace:
2323
#0 {main}
2424
thrown in %s on line %d

Zend/tests/property_hooks/get.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ try {
2121
?>
2222
--EXPECT--
2323
int(42)
24-
Property Test::$prop is read-only
24+
Cannot write to get-only virtual property Test::$prop

Zend/tests/property_hooks/override_add_get.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var_dump($b->prop);
3131
?>
3232
--EXPECT--
3333
A::A::$prop::set
34-
Property A::$prop is write-only
34+
Cannot read from set-only virtual property A::$prop
3535
B::B::$prop::set
3636
B::B::$prop::get
3737
int(42)

Zend/tests/property_hooks/override_add_set.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var_dump($b->prop);
3030

3131
?>
3232
--EXPECT--
33-
Property A::$prop is read-only
33+
Cannot write to get-only virtual property A::$prop
3434
A::A::$prop::get
3535
int(42)
3636
B::B::$prop::set

Zend/tests/property_hooks/set.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ try {
2828
?>
2929
--EXPECT--
3030
int(42)
31-
Property Test::$prop is write-only
32-
Property Test::$prop is write-only
31+
Cannot read from set-only virtual property Test::$prop
32+
Cannot read from set-only virtual property Test::$prop

Zend/tests/property_hooks/type_compatibility.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Relaxed type compatibility for read-only and write-only properties
2+
Relaxed type compatibility for get-only and set-only properties
33
--FILE--
44
<?php
55

Zend/tests/property_hooks/type_compatibility_invalid.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Invalid type compatibility for read-only property
2+
Invalid type compatibility for get-only property
33
--FILE--
44
<?php
55

0 commit comments

Comments
 (0)