Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

laravel Interface 'JsonSerializable' not found

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
like image 634
Karlo Avatar asked Nov 10 '22 07:11

Karlo


1 Answers

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

like image 131
ollieread Avatar answered Jan 04 '23 03:01

ollieread