Not a bug Can't use namespace on Tools Rebuild

truonglv

Well-known member
As title. If you used namespace on Tools Rebuild you can't do.

Because its hardcode:

PHP:
public static function create($class)
    {
        if (strpos($class, '_') === false)
        {
            $class = 'XenForo_Deferred_' . $class;
        }

        $class = XenForo_Application::resolveDynamicClass($class);
        $object = new $class();
        if (!($object instanceof XenForo_Deferred_Abstract))
        {
            return false;
        }
        return $object;
    }

I don't find any way to extends that. Hope you can fixed that :)
 
Yep! I know for Controller. I can extends to use that. But with Deferred. You don't provide an way for developer to use that :/
 
Mike has addressed that already in the message he has linked to:

No real plans to change this as the system is not designed with namespaces in mind; you may find this pattern in a few places.

You'd be better off creating a suggestion but I think Mike has already stated that PHP requirements may change in XF 2.0 so presumably that's where XenForo will catch up with things like namespaces.
 
Top Bottom