laravel Interface 'JsonSerializable' not found

。_饼干妹妹 提交于 2019-12-10 14:31:51

问题


Im using the following for my application for social media login https://github.com/madewithlove/laravel-oauth2

but im getting this error

Symfony \ Component \ Debug \ Exception \ FatalErrorException
Interface 'JsonSerializable' not found
open: /Applications/AMPPS/www/docsearch/vendor/madewithlove/laravel-oauth2/src/OAuth2/Token/Access.php
 * @package    OAuth2
 * @category   Token
 * @author     Phil Sturgeon
 * @copyright  (c) 2011 HappyNinjas Ltd
 */

class Token_Access extends Token implements \JsonSerializable
{
    /**
     * @var  string  access_token

回答1:


This isn't actually a Laravel issue, it's to do with your version of PHP. If you look at the official PHP documentation you'll see that this particular interface is only available for PHP versions 5.4 and up.

Source: http://php.net/manual/en/class.jsonserializable.php



来源:https://stackoverflow.com/questions/23978330/laravel-interface-jsonserializable-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!