I've got a problem with new Restler3 RC4: My API list in resource.json is just empty:
{
"apiVersion": "1",
"swaggerVersion": "1.1",
"basePath": "xxxxxx/API/index.php",
"apis":
[
]
}
But by uncommenting the vendor/restler.php file to look like this:
require_once 'Luracast/Restler/AutoLoader.php';
return call_user_func(function ()
{
$loader = Luracast\Restler\AutoLoader::instance();
spl_autoload_register($loader);
return $loader;
});
It will work. But that way the twig-template stuff and so on doesn't work (Have a look here: Restler3 RC4: oAuth doesn't work). So where is the problem right now? Of course, it's about autoloading, right? I hate auto loading! -.-
Thanks guys, Jan
UPDATE 1 According to https://github.com/Luracast/Restler/issues/207#issuecomment-25678729 I updated to the latest stable release and now my resource.json prints the following (the first 'Strict Standards' appears 193 times):
<b>Strict Standards</b>: Only variables should be passed by reference in <b>xxxx/API/restler/vendor/Luracast/Restler/Routes.php</b> on line <b>228</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at xxxx/API/restler/vendor/Luracast/Restler/Routes.php:228) in <b>xxxx/API/restler/vendor/Luracast/Restler/Filter/RateLimit.php</b> on line <b>119</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at xxxx/API/restler/vendor/Luracast/Restler/Routes.php:228) in <b>xxxx/API/restler/vendor/Luracast/Restler/Filter/RateLimit.php</b> on line <b>137</b><br />
{
"apiVersion": "1",
"swaggerVersion": "1.1",
"basePath": "xxx/API/index.php",
"apis": [
{
"path": "/resources/consumer.{format}",
"description": ""
},
{
"path": "/resources/request.{format}",
"description": ""
},
{
"path": "/resources/shorturl.{format}",
"description": ""
},
{
"path": "/resources/comment.{format}",
"description": ""
},
{
"path": "/resources/favorites.{format}",
"description": ""
},
{
"path": "/resources/options.{format}",
"description": ""
},
{
"path": "/resources/plugins.{format}",
"description": ""
},
{
"path": "/resources/themes.{format}",
"description": ""
},
{
"path": "/resources/updater.{format}",
"description": ""
},
{
"path": "/resources/preferences.{format}",
"description": ""
}
]
}
As you can see, I get my apis! :) But how can I fix the warnings?
We have just just released an update to fix this strict standards warning
That should fix it for you