With v4 of Fluid, the goal is to not break any custom ViewHelpers out there. Thus, we only apply type hints to ViewHelper-related API for cases where we can be reasonably sure that it won't break ViewHelpers.
AbstractViewHelper is extended directly by custom ViewHelpers, so we can only type hint private properties.
ViewHelperInvoker and ViewHelperResolver are APIs that are implemented by frameworks that use Fluid for templating, so stricter types don't affect ViewHelper implementations. Still, there are some cases in which we won't enforce types because it is unclear if there are edge cases out there where the supplied types actually match existing PHPDOC annotations. For example, we can't really be sure if templates or ViewHelpers always return strings, so we stay away from those type hints for now.
TagBuilder, ArgumentDefinition and ViewHelperVariableContainer are often utilized from within ViewHelpers. However, because of their respected isolated functionality, we can be pretty sure about the types and thus apply them for most methods and properties.
With v4 of Fluid, the goal is to not break any custom ViewHelpers out there. Thus, we only apply type hints to ViewHelper-related API for cases where we can be reasonably sure that it won't break ViewHelpers.
AbstractViewHelper is extended directly by custom ViewHelpers, so we can only type hint private properties.
ViewHelperInvoker and ViewHelperResolver are APIs that are implemented by frameworks that use Fluid for templating, so stricter types don't affect ViewHelper implementations. Still, there are some cases in which we won't enforce types because it is unclear if there are edge cases out there where the supplied types actually match existing PHPDOC annotations. For example, we can't really be sure if templates or ViewHelpers always return strings, so we stay away from those type hints for now.
TagBuilder, ArgumentDefinition and ViewHelperVariableContainer are often utilized from within ViewHelpers. However, because of their respected isolated functionality, we can be pretty sure about the types and thus apply them for most methods and properties.