Closed esafwan closed 7 years ago
Hi @esafwan, thank you for reaching out!
The following statement is missing in the code snippet above:
use Firebase\Auth\Token\Generator;
Without it, PHP tries to use the Generator
class from the root namespace, which indeed cannot be instantiated.
When trying out your code, as per the example in the readme. I am getting an error as below:
[Sun Jun 11 02:14:08.042454 2017] [:error] [pid 1813] [client 192.168.0.118:63309] PHP Fatal error: Uncaught Error: The "Generator" class is reserved for internal use and cannot be manually instantiated in /var/www/html/firebase/generate_token.php:10\nStack trace:\n#0 {main}\n thrown in /var/www/html/firebase/generate_token.php on line 10, referer: http://192.168.0.105/firebase/
My sample code is given below: