I want to call the Binance\API and Binance\RateLimiter in the controller, but because these two class have the same namespace. Symfony4 is returning an error "Attempted to load class "RateLimiter" from namespace "Binance". Did you forget a "use" statement for another namespace?"
here my sample code:
<?php
namespace App\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Binance;
class LuckyController extends Controller
{
/**
* @Route("/lucky", name="lucky")
*/
public function index()
{
$api = new Binance\API();
$api = new Binance\RateLimiter($api);
while(true) {
print_r($api->history("BTCUSDT"));
exit();
}
}
}
any help is appreciated