[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-cvs
Subject:    [PHP-CVS] com php-src: Rename ReflectionClass::isIterateable() to isIterable(): NEWS =?UTF-8?Q?ext/r
From:       Sara Golemon <pollita () php ! net>
Date:       2017-05-31 19:08:07
Message-ID: php-mail-79bc1054e99612655d98af666352caf799349382 () git ! php ! net
[Download RAW message or body]

Commit:    c1500f8519aded29c3632de4240fbc0a4e485a81
Author:    Sara Golemon <pollita@php.net>         Wed, 31 May 2017 11:44:53 -0700
Parents:   fc1ae1d1d3b1752c581e258fd3fcc3a184631baa
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=c1500f8519aded29c3632de4240fbc0a4e485a81


Log:
Rename ReflectionClass::isIterateable() to isIterable()

Iterateable is not a word.
Add the correct spelling, but keep the original one around
for BC purposes.

Perhaps we can add ZEND_ACC_DEPRECATED at some later date
and even remove it from PHP 8.

Changed paths:
  M  NEWS
  M  ext/reflection/php_reflection.c
  M  ext/reflection/tests/ReflectionClass_toString_001.phpt


Diff:
diff --git a/NEWS b/NEWS
index f8b8bf7..c972559 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ PHP                                                                 \
                NEWS
   . Removed IS_TYPE_IMMUTABLE (it's the same as COPYABLE & !REFCOUNTED). (Dmitry)
   . Removed the sql.safe_mode directive. (Kalle)
   . Removed support for Netware. (Kalle)
+  . Renamed ReflectionClass::isIterateable() to ReflectionClass::isIterable()
+    (alias original name for BC). (Sara)
   . Fixed bug #54535 (WSA cleanup executes before MSHUTDOWN). (Kalle)
   . Implemented FR #69791 (Disallow mail header injections by extra headers)
     (Yasuo)
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 3e5af0d..84f4d66 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -5117,9 +5117,9 @@ ZEND_METHOD(reflection_class, implementsInterface)
 }
 /* }}} */
 
-/* {{{ proto public bool ReflectionClass::isIterateable()
-   Returns whether this class is iterateable (can be used inside foreach) */
-ZEND_METHOD(reflection_class, isIterateable)
+/* {{{ proto public bool ReflectionClass::isIterable()
+   Returns whether this class is iterable (can be used inside foreach) */
+ZEND_METHOD(reflection_class, isIterable)
 {
 	reflection_object *intern;
 	zend_class_entry *ce;
@@ -6465,7 +6465,8 @@ static const zend_function_entry reflection_class_functions[] = \
{  ZEND_ME(reflection_class, getStaticPropertyValue, \
arginfo_reflection_class_getStaticPropertyValue, 0)  ZEND_ME(reflection_class, \
setStaticPropertyValue, arginfo_reflection_class_setStaticPropertyValue, 0)  \
                ZEND_ME(reflection_class, getDefaultProperties, \
                arginfo_reflection__void, 0)
-	ZEND_ME(reflection_class, isIterateable, arginfo_reflection__void, 0)
+	ZEND_ME(reflection_class, isIterable, arginfo_reflection__void, 0)
+	ZEND_MALIAS(reflection_class, isIterateable, isIterable, arginfo_reflection__void, \
0)  ZEND_ME(reflection_class, implementsInterface, \
arginfo_reflection_class_implementsInterface, 0)  ZEND_ME(reflection_class, \
getExtension, arginfo_reflection__void, 0)  ZEND_ME(reflection_class, \
                getExtensionName, arginfo_reflection__void, 0)
diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt \
b/ext/reflection/tests/ReflectionClass_toString_001.phpt index 2b185db..5a2b497 \
                100644
--- a/ext/reflection/tests/ReflectionClass_toString_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt
@@ -34,7 +34,7 @@ Class [ <internal:Reflection> class ReflectionClass implements \
Reflector ] {  Property [ <default> public $name ]
   }
 
-  - Methods [52] {
+  - Methods [53] {
     Method [ <internal:Reflection> final private method __clone ] {
 
       - Parameters [0] {
@@ -323,6 +323,12 @@ Class [ <internal:Reflection> class ReflectionClass implements \
Reflector ] {  }
     }
 
+    Method [ <internal:Reflection> public method isIterable ] {
+
+      - Parameters [0] {
+      }
+    }
+
     Method [ <internal:Reflection> public method isIterateable ] {
 
       - Parameters [0] {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic