The use statement with non-compound name 'Requests' has no effect in

I am trying to use Requests . I have added it using composer. Now when I try to sue this code

use Requests;

Requests::register_autoloader();

I am getting this warning

The use statement with non-compound name ‘Requests’ has no effect in

Are you trying to use it within Slim? I’m not familiar with that package, but you could quickly try $ composer dump-autoload -o.

Although taking a quick look at that package it looks like it doesn’t use namespaces, so “importing” it with the use statement wouldn’t make sense. I’d remove the use Request; line.

1 Like