Error in autoload when using HighchartsPHP

0

I'm including in my ghunti / highcharts-php composer: "~ 3.0" and after that my autoload stops working resulting in the fatal error below, what could it be? >

  

Fatal error: Call to undefined method   Composer \ Autoload \ ClassLoader :: setPsr4 () in   /Users/my-user/my-project/dev/vendor/composer/autoload_real.php   online 37

    
asked by anonymous 03.12.2014 / 12:18

1 answer

1

Make sure your composer and vendor/autoload.php are up to date.

Before running composer update , run the following commands:

To update the composer:

composer selfupdate

To regenerate vendor/autoload.php :

composer dump-autoload

At the end, make sure you are properly importing% required% through namespaces

Here is an example of a page that works with the instance of use

<?php

require 'vendor/autoload.php';

use Ghunti\HighchartsPHP\Highchart;

$chart = new Highchart();

var_dump($chart);
    
03.12.2014 / 12:22