AWS PHP SDK 2 (aws.phar) does not work with Restler Framework

冷暖自知 提交于 2019-12-06 05:44:53

This held me back quite some time,

The issue is caused by reslters autoloader which sets spl_autoload_unregiste as described here: https://github.com/Luracast/Restler/issues/72

One way to get arround the problem is to comment out the relevant lines in vendor/Luracast/Restler/AutoLoader.php

    public static function thereCanBeOnlyOne() {
    if (static::$perfectLoaders === spl_autoload_functions())
        return static::$instance;

/*
    if (false !== $loaders = spl_autoload_functions())
        if (0 < $count = count($loaders))
            for ($i = 0, static::$rogueLoaders += $loaders;
                 $i < $count && false != ($loader = $loaders[$i]);
                 $i++)
                if ($loader !== static::$perfectLoaders[0])
                    spl_autoload_unregister($loader);
    */
    return static::$instance;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!