Page MenuHomePhabricator

D13898.diff
No OneTemporary

D13898.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
Sun, May 12, 6:40 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6290836
Default Alt Text
D13898.diff (968 B)

Event Timeline