public static function setFilterAliases(array $aliases)
    {
        $originalAliases = self::$registeredFilterAliases;
        self::$registeredFilterAliases = [];
        try {
            foreach ($aliases as $alias => $callback) {
                self::registerAlias($alias, $callback);
            }
        } catch (Throwable $throwable) {
            self::$registeredFilterAliases = $originalAliases;
            throw $throwable;
        }
    }