Skip to content

Latest commit

 

History

History
184 lines (162 loc) · 6.87 KB

compatibility.md

File metadata and controls

184 lines (162 loc) · 6.87 KB

Compatibility with native reflection API

ReflectionClass

Method Supported
getConstant ✔️ Yes (the ::class constant is now resolved correctly)
getConstants ✔️ Yes
getConstructor ✔️ Yes
getDefaultProperties ✔️ Yes
getDocComment ✔️ Yes
getEndLine ✔️ Yes
getExtension ❌ No - see (#15)
getExtensionName ✔️ Yes
getFileName ✔️ Yes
getInterfaceNames ✔️ Yes
getInterfaces ✔️ Yes
getMethod ✔️ Yes
getMethods ✔️ Yes
getModifiers ✔️ Yes
getName ✔️ Yes
getNamespaceName ✔️ Yes
getParentClass ✔️ Yes
getProperties ✔️ Yes
getProperty ✔️ Yes
getShortName ✔️ Yes
getStartLine ✔️ Yes
getStaticProperties ✔️ Yes
getStaticPropertyValue ✔️ Yes
getTraitAliases ✔️ Yes
getTraitNames ✔️ Yes
getTraits ✔️ Yes
hasConstant ✔️ Yes
hasMethod ✔️ Yes
hasProperty ✔️ Yes
implementsInterface ✔️ Yes
inNamespace ✔️ Yes
isAbstract ✔️ Yes
isAnonymous ✔️ Yes
isCloneable ✔️ Yes
isFinal ✔️ Yes
isInstance ✔️ Yes
isInstantiable ✔️ Yes
isInterface ✔️ Yes
isInternal ✔️ Yes
isIterateable ✔️ Yes
isSubclassOf ✔️ Yes
isTrait ✔️ Yes
isUserDefined ✔️ Yes
newInstance ❌ No - see (#14)
newInstanceArgs ❌ No - see (#14)
newInstanceWithoutConstructor ❌ No - see(#14)
setStaticPropertyValue ✔️ Yes

ReflectionFunctionAbstract

Method Supported
getClosureScopeClass ❌ No - see (#14)
getClosureThis ❌ No - see (#14)
getDocComment ✔️ Yes
getEndLine ✔️ Yes
getExtension ❌ No - see (#15)
getExtensionName ✔️ Yes
getFileName ✔️ Yes
getName ✔️ Yes
getNamespaceName ✔️ Yes
getNumberOfParameters ✔️ Yes
getNumberOfRequiredParameters ✔️ Yes
getParameters ✔️ Yes
getShortName ✔️ Yes
getStartLine ✔️ Yes
getStaticVariables ❌ No - see (#14)
inNamespace ✔️ Yes
isClosure ✔️ Yes
isDeprecated ✔️ Yes
isGenerator ✔️ Yes
isInternal ✔️ Yes
isUserDefined ✔️ Yes
isVariadic ✔️ Yes
returnsReference ✔️ Yes
getReturnType ✔️ Yes
hasReturnType ✔️ Yes

ReflectionMethod

Method Supported
getClosure ✔️ Yes
getDeclaringClass ✔️ Yes
getModifiers ✔️ Yes
getPrototype ✔️ Yes
invoke ✔️ Yes
invokeArgs ✔️ Yes
isAbstract ✔️ Yes
isConstructor ✔️ Yes
isDestructor ✔️ Yes
isFinal ✔️ Yes
isPrivate ✔️ Yes
isProtected ✔️ Yes
isPublic ✔️ Yes
isStatic ✔️ Yes
setAccessible ✔️ Yes
inherited methods see ReflectionFunctionAbstract

ReflectionParameter

Method Supported
allowsNull ✔️ Yes
canBePassedByValue ✔️ Yes
getClass ✔️ Yes
getDeclaringClass ✔️ Yes
getDeclaringFunction ✔️ Yes
getDefaultValue ✔️ Yes (*some assumptions are made)
getDefaultValueConstantName ✔️ Yes
getName ✔️ Yes
getPosition ✔️ Yes
isArray ✔️ Yes
isCallable ✔️ Yes
isDefaultValueAvailable ✔️ Yes
isDefaultValueConstant ✔️ Yes
isOptional ✔️ Yes
isPassedByReference ✔️ Yes
isVariadic ✔️ Yes
getType ✔️ Yes
hasType ✔️ Yes

ReflectionFunction

Method Supported
getClosure ✔️ Not implemented for closures
invoke ✔️ Not implemented for closures
invokeArgs ✔️ Not implemented for closures
isDisabled ✔️ Yes
inherited methods see ReflectionFunctionAbstract

ReflectionProperty

Method Supported
getDeclaringClass ✔️ Yes
getDocComment ✔️ Yes
getModifiers ✔️ Yes
getName ✔️ Yes
getValue ✔️ Yes
isDefault ✔️ Yes
isPrivate ✔️ Yes
isProtected ✔️ Yes
isPublic ✔️ Yes
isStatic ✔️ Yes
setAccessible ✔️ Yes
setValue ✔️ Yes

ReflectionExtension

❌ Will not be implemented

ReflectionZendExtension

❌ Will not be implemented

ReflectionObject

Implemented as a wrapper around ReflectionClass, so the API is the same.

ReflectionType

Method Supported
__toString ✔️ Yes
allowsNull ✔️ Yes
isBuiltin ✔️ Yes

ReflectionAttribute

Method Supported
getArguments ✔️ Yes
getName ✔️ Yes
getTarget ✔️ Yes
isRepeated ✔️ Yes
newInstance ❌ No - see (#1353)