Open ivanstan opened 6 years ago
@ivanstan did you solve this? I ran into the same problem
No, unfortunately I didn't have time. Migrating to newer php version will be more than this one issue.
I tried updating dependencies thinking one of them probably had a new version that supported php7, got stuck with this error for now
Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Debug\ExceptionHandler::handle() must be an instance of Exception, instance of Error given in /vendor/symfony/debug/ExceptionHandler.php:117
Stack trace: #0 [internal function]: Symfony\Component\Debug\ExceptionHandler->handle(Object(Error)) #1 {main} thrown in /vendor/symfony/debug/ExceptionHandler.php on line 117
Same issue here under php's bultin server (php -S
):
127.0.0.1:62959 [200]: /logs - Cannot use Syonix\Util\String as String because 'String' is a special class name in /Users/jdrummond/Projects/monolog-viewer/src/Syonix/LogViewer/Client.php on line 5
Edit:
Installed php 5.6 and php56 -S
works as expected.
Any update on this, please?
Looks like current HEAD on master is working on php-7.1
Any news for PHP 7.x ? It's really a problem for apps running with the new Symfony 4.x (require PHP 7.1)...
@davidcancalon It works for me with PHP 7.1, what can you see in your error logs?
I solved this by changing on src/Syonix/LogViewer/Client.php the following:
On line 5 From: use Syonix\Util\String;
To: use Syonix\Util\String as SyonixString;
And on line 28:
From $this->slug = String::toAscii($name); To: $this->slug = SyonixString::toAscii($name);
That's it
After setting up the config and password, blank page is shown on url
/logs
Error in PHP log: Fatal error: Cannot use Syonix\Util\String as String because 'String' is a special class name in /var/www/html/dev/log/src/Syonix/LogViewer/Client.php on line 5
I might fork to add support for PHP7