Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13996434
D13898.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
968 B
Referenced Files
None
Subscribers
None
D13898.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 24, 9:07 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720250
Default Alt Text
D13898.diff (968 B)
Attached To
Mode
D13898: Allow PhutilClassMapQuery to load implementors of an interface
Attached
Detach File
Event Timeline
Log In to Comment