Page MenuHomePhabricator

D13898.id.diff
No OneTemporary

D13898.id.diff

diff --git a/src/symbols/PhutilClassMapQuery.php b/src/symbols/PhutilClassMapQuery.php
--- a/src/symbols/PhutilClassMapQuery.php
+++ b/src/symbols/PhutilClassMapQuery.php
@@ -56,9 +56,10 @@
/**
- * Set the ancestor class name to load the concrete descendants of.
+ * Set the ancestor class or interface name to load the concrete descendants
+ * of.
*
- * @param string Ancestor class name.
+ * @param string Ancestor class or interface name.
* @return this
* @task config
*/
@@ -196,11 +197,11 @@
throw new PhutilInvalidStateException('setAncestorClass');
}
- if (!class_exists($ancestor)) {
+ if (!class_exists($ancestor) && !interface_exists($ancestor)) {
throw new Exception(
pht(
'Trying to execute a class map query for descendants of class '.
- '"%s", but no such class exists.',
+ '"%s", but no such class or interface exists.',
$ancestor));
}

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 17, 2:34 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720250
Default Alt Text
D13898.id.diff (968 B)

Event Timeline