Torann / laravel-currency

This provides Laravel with currency functions such as currency formatting and conversion using up-to-date exchange rates.
http://lyften.com/projects/laravel-currency
BSD 2-Clause "Simplified" License
393 stars 136 forks source link

Function name must be a string Error upon initial setup #109

Open wicki12c opened 6 years ago

wicki12c commented 6 years ago

Line 277 of laravel-currency/src/Currency.php

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Function name must be a string

marsal commented 4 years ago

I have the same problem, any thoughts?

`Symfony\Component\Debug\Exception\FatalThrowableError : Class name must be a valid object or a string

at {project_path}/vendor/torann/currency/src/Currency.php:277 273| // Get driver class 274| $driver = Arr::pull($config, 'class'); 275| 276| // Create driver instance

277| $this->driver = new $driver($config); 278| } 279| 280| return $this->driver; 281| }

Exception trace:

1 Torann\Currency\Currency::getDriver() {project_path}/vendor/torann/currency/src/Console/Manage.php:45

2 Torann\Currency\Console\Manage::__construct()

Please use the argument -v to see more details.`

PHP Version PHP 7.3.15-3+ubuntu19.10.1+deb.sury.org+1 (cli) (built: Feb 23 2020 07:24:02) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.15, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.15-3+ubuntu19.10.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Laravel Version 6.0

davidiwezulu commented 4 years ago

Run php artisan cache:clear and php artisan config:clear before re-installing via composer. Basically clear your cached configurations.

You might prefer to just run php artisan cache:config to do the same thing. I hope it helps.

vahidtakro commented 3 years ago

this issue still exists, nothing fixes it .