Not a bug Can't use namespace on Tools Rebuild


Formerly Nobita.Kun
As title. If you used namespace on Tools Rebuild you can't do.

Because its hardcode:

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 :)


Formerly Nobita.Kun
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 :/

Chris D

XenForo developer
Staff member
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.