Closed bradJM closed 10 years ago
@bradJM Thanks for reporting it, I will take a look when I get home.
In the meantime, can you post your code for me to reproduce?
Ah, it is a namespace issue. I will commit a fix tonight. Again, will be great if you can post your psudo code so I can verify the fix.
Unfortunately not, it's work code. I can tell you that we're using the Silex Guzzle provider to store an instance of Guzzle\Service\Client in $app, then calling new VirusTotal\File() with our API key and the stored Guzzle client.
I suspect changing the typehint in ApiBase will fix it.
Yeah, the type hint needs to be fully namespaced. I have the fix and let me cook some tests and will release a minor fix soon.
Great, thanks!
Also pushed a new release to: https://github.com/jayzeng/virustotal_apiwrapper/releases/tag/v0.1.2
It should be available through composer in few minutes, if not, please let me know.
If you try to pass in an existing Guzzle client to the ApiBase constructor, you get the following error:
"PHP Catchable fatal error: Argument 2 passed to VirusTotal\ApiBase::__construct() must be an instance of VirusTotal\ClientInterface, instance of Guzzle\Service\Client given"