summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-04-02 11:25:41 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-04-02 11:25:41 +0200
commit184fdac7c2dd4bf97a6c70de6d9385c203e4a88a (patch)
tree37e251f424f464efb1242769df063dc0a09e6e8c
parent083b0c38a0aad768403d9fc973e70e02712bd031 (diff)
downloadphp-git-184fdac7c2dd4bf97a6c70de6d9385c203e4a88a.tar.gz
Remove <default> prefix from reflection dump
This really doesn't add anything, and only makes for confusing terminology. Only marking properties as dynamic is sufficient.
-rw-r--r--ext/reflection/php_reflection.c4
-rw-r--r--ext/reflection/tests/024.phpt6
-rw-r--r--ext/reflection/tests/ReflectionClass_export_basic2.phpt10
-rw-r--r--ext/reflection/tests/ReflectionClass_toString_001.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject___toString_basic1.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject___toString_basic2.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_export_basic1.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_export_basic2.phpt2
-rw-r--r--ext/reflection/tests/ReflectionProperty_basic1.phpt6
-rw-r--r--sapi/cli/tests/005.phpt16
10 files changed, 24 insertions, 28 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 77037f9571..278e565874 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -843,10 +843,6 @@ static void _property_string(smart_str *str, zend_property_info *prop, const cha
if (!prop) {
smart_str_append_printf(str, "<dynamic> public $%s", prop_name);
} else {
- if (!(prop->flags & ZEND_ACC_STATIC)) {
- smart_str_appends(str, "<default> ");
- }
-
/* These are mutually exclusive */
switch (prop->flags & ZEND_ACC_PPP_MASK) {
case ZEND_ACC_PUBLIC:
diff --git a/ext/reflection/tests/024.phpt b/ext/reflection/tests/024.phpt
index 3582619aa5..46db75c911 100644
--- a/ext/reflection/tests/024.phpt
+++ b/ext/reflection/tests/024.phpt
@@ -29,9 +29,9 @@ Object of class [ <user> class C1 ] {
}
- Properties [3] {
- Property [ <default> private $p1 = 1 ]
- Property [ <default> protected $p2 = 2 ]
- Property [ <default> public $p3 = 3 ]
+ Property [ private $p1 = 1 ]
+ Property [ protected $p2 = 2 ]
+ Property [ public $p3 = 3 ]
}
- Dynamic properties [1] {
diff --git a/ext/reflection/tests/ReflectionClass_export_basic2.phpt b/ext/reflection/tests/ReflectionClass_export_basic2.phpt
index f222eb073f..5ed4ad5d7b 100644
--- a/ext/reflection/tests/ReflectionClass_export_basic2.phpt
+++ b/ext/reflection/tests/ReflectionClass_export_basic2.phpt
@@ -29,9 +29,9 @@ Class [ <user> class c ] {
}
- Properties [3] {
- Property [ <default> private $a = NULL ]
- Property [ <default> public ?int $c = 42 ]
- Property [ <default> public Foo $d ]
+ Property [ private $a = NULL ]
+ Property [ public ?int $c = 42 ]
+ Property [ public Foo $d ]
}
- Methods [0] {
@@ -51,8 +51,8 @@ Class [ <user> class d extends c ] {
}
- Properties [2] {
- Property [ <default> public ?int $c = 42 ]
- Property [ <default> public Foo $d ]
+ Property [ public ?int $c = 42 ]
+ Property [ public Foo $d ]
}
- Methods [0] {
diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt
index a00478e7d8..2dc742e3ec 100644
--- a/ext/reflection/tests/ReflectionClass_toString_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt
@@ -24,7 +24,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector, String
}
- Properties [1] {
- Property [ <default> public $name = '' ]
+ Property [ public $name = '' ]
}
- Methods [53] {
diff --git a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt
index 1f64717863..9da648f3a2 100644
--- a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt
+++ b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt
@@ -25,7 +25,7 @@ Object of class [ <user> class Foo ] {
}
- Properties [1] {
- Property [ <default> public $bar = 1 ]
+ Property [ public $bar = 1 ]
}
- Dynamic properties [0] {
diff --git a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt
index 8de730e9e3..e93dd9b331 100644
--- a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt
+++ b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt
@@ -26,7 +26,7 @@ Object of class [ <user> class Foo ] {
}
- Properties [1] {
- Property [ <default> public $bar = 1 ]
+ Property [ public $bar = 1 ]
}
- Dynamic properties [2] {
diff --git a/ext/reflection/tests/ReflectionObject_export_basic1.phpt b/ext/reflection/tests/ReflectionObject_export_basic1.phpt
index 1f64717863..9da648f3a2 100644
--- a/ext/reflection/tests/ReflectionObject_export_basic1.phpt
+++ b/ext/reflection/tests/ReflectionObject_export_basic1.phpt
@@ -25,7 +25,7 @@ Object of class [ <user> class Foo ] {
}
- Properties [1] {
- Property [ <default> public $bar = 1 ]
+ Property [ public $bar = 1 ]
}
- Dynamic properties [0] {
diff --git a/ext/reflection/tests/ReflectionObject_export_basic2.phpt b/ext/reflection/tests/ReflectionObject_export_basic2.phpt
index 8de730e9e3..e93dd9b331 100644
--- a/ext/reflection/tests/ReflectionObject_export_basic2.phpt
+++ b/ext/reflection/tests/ReflectionObject_export_basic2.phpt
@@ -26,7 +26,7 @@ Object of class [ <user> class Foo ] {
}
- Properties [1] {
- Property [ <default> public $bar = 1 ]
+ Property [ public $bar = 1 ]
}
- Dynamic properties [2] {
diff --git a/ext/reflection/tests/ReflectionProperty_basic1.phpt b/ext/reflection/tests/ReflectionProperty_basic1.phpt
index ed14830bde..cef672ecde 100644
--- a/ext/reflection/tests/ReflectionProperty_basic1.phpt
+++ b/ext/reflection/tests/ReflectionProperty_basic1.phpt
@@ -48,7 +48,7 @@ reflectProperty("TestClass", "priv");
Reflecting on property TestClass::pub
__toString():
-string(42) "Property [ <default> public $pub = NULL ]
+string(32) "Property [ public $pub = NULL ]
"
getName():
string(3) "pub"
@@ -92,7 +92,7 @@ string(8) "NewValue"
Reflecting on property TestClass::prot
__toString():
-string(43) "Property [ <default> protected $prot = 4 ]
+string(33) "Property [ protected $prot = 4 ]
"
getName():
string(4) "prot"
@@ -110,7 +110,7 @@ bool(false)
Reflecting on property TestClass::priv
__toString():
-string(49) "Property [ <default> private $priv = 'keepOut' ]
+string(39) "Property [ private $priv = 'keepOut' ]
"
getName():
string(4) "priv"
diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt
index ad0ea37c29..e8faa79f0d 100644
--- a/sapi/cli/tests/005.phpt
+++ b/sapi/cli/tests/005.phpt
@@ -37,7 +37,7 @@ string(183) "Class [ <internal:Core> class stdClass ] {
}
"
-string(2008) "Class [ <internal:Core> class Exception implements Throwable, Stringable ] {
+string(1980) "Class [ <internal:Core> class Exception implements Throwable, Stringable ] {
- Constants [0] {
}
@@ -49,13 +49,13 @@ string(2008) "Class [ <internal:Core> class Exception implements Throwable, Stri
}
- Properties [7] {
- Property [ <default> protected $message ]
- Property [ <default> private $string ]
- Property [ <default> protected $code ]
- Property [ <default> protected $file ]
- Property [ <default> protected $line ]
- Property [ <default> private $trace ]
- Property [ <default> private $previous ]
+ Property [ protected $message = '' ]
+ Property [ private $string = '' ]
+ Property [ protected $code = 0 ]
+ Property [ protected $file = NULL ]
+ Property [ protected $line = NULL ]
+ Property [ private $trace = NULL ]
+ Property [ private $previous = NULL ]
}
- Methods [11] {