-
Notifications
You must be signed in to change notification settings - Fork 658
Statistics\DnsResolver may not inherit from final class #216
Comments
我也遇到相同错误。
final class Resolver class Resolver After replacement or rewriting, it seems that it can be solved. run PHP Fatal error: Class BeyondCode\LaravelWebSockets\Statistics\DnsResolver may not inherit from final class (React\Dns\Resolver\Resolver) in /home/vagrant/websocket/vendor/beyondcode/laravel-websockets/src/Statistics/DnsResolver.php on line 8
Symfony\Component\Debug\Exception\FatalErrorException : Class BeyondCode\LaravelWebSockets\Statistics\DnsResolver may not inherit from final class (React\Dns\Resolver\Resolver)
at /home/vagrant/websocket/vendor/beyondcode/laravel-websockets/src/Statistics/DnsResolver.php:8
4|
5| use React\Dns\Resolver\Resolver;
6| use React\Promise\FulfilledPromise;
7|
> 8| class DnsResolver extends Resolver
9| {
10| /*
11| * This empty constructor is needed so we don't have to setup the parent's dependencies.
12| */
Whoops\Exception\ErrorException : Class BeyondCode\LaravelWebSockets\Statistics\DnsResolver may not inherit from final class (React\Dns\Resolver\Resolver)
at /home/vagrant/websocket/vendor/beyondcode/laravel-websockets/src/Statistics/DnsResolver.php:8
4|
5| use React\Dns\Resolver\Resolver;
6| use React\Promise\FulfilledPromise;
7|
> 8| class DnsResolver extends Resolver
9| {
10| /*
11| * This empty constructor is needed so we don't have to setup the parent's dependencies.
12| */
Exception trace:
1 Whoops\Run::handleError("Class BeyondCode\LaravelWebSockets\Statistics\DnsResolver may not inherit from final class (React\Dns\Resolver\Resolver)", "/home/vagrant/websocket/vendor/beyondcode/laravel-websockets/src/Statistics/DnsResolver.php")
/home/vagrant/websocket/vendor/filp/whoops/src/Whoops/Run.php:433
2 Whoops\Run::handleShutdown()
[internal]:0 |
Confirming that I am also experiencing this issue. It seems to have been introduced with this commit. A temporary workaround is to forcibly downgrade react/dns in your |
I have this problem too. It started after I upgraded to Laravel5.8 since then I can't run I don't know what else to do right now, can anyone help please?
Thanks for your prompt response. I deleted the vendor folder and did |
@ehiaig maybe try to remove the |
What worked for me is updating |
While this "works", it is incredibly poor practice to directly edit any code in your vendor directory (or any other directory managed by a dependency/package manager such as node_modules) for a couple of reasons, and I seriously would not recommend it.
If In your case, that hasn't seemed to have worked. After deleting the vendor directory , can you confirm that it is in fact entirely gone? If not, an |
low down to ^0.4 will be works |
@clugg I am really grateful for your detailed response. I have deleted the vendor folder and done |
Following this, it has been resolved by I adding |
Got the same error; and the suggested workaround did the job. How soon can I expect an official fix for this issue? |
I might be wrong, but you tend to get this problem if your user doesn't have the correct read/write permissions in Ubuntu. A quick way round this would be to do 'sudo composer update' rather than 'composer update'. It's not recommended to do this though because you're letting any install scripts run on your machine with root privileges. Best work around would be to make sure you've got the permissions for the folders/files you're working with. |
Good morning, as you might have noticed we introduced several BC break in our latest major release of Currently the best option for you to mitigate this at the short term is to require Going forward there are two options: For both options I strongly suggest requiring P.S. Next time just ping me when one of these issues arises with packages I'm involved with. |
nope, just downloaded and got this exact error on built. |
Right, I got the same error too! |
Hi I think a new release is still missing. So, yeah, it is solved with the given tickets and commits, but only in the master branch, as it is merged but not released atm. Cheers |
Oh I got the same error today, and I fixed it with updating |
You could temporarily require this package as |
Any word on when a new tag will be released? |
@mpociot any chance you could bump the version to include the latest merges? This bug is making laravel-websockets unusable on a new install. |
this is resolved and can be closed with 1.2 right? |
I can confirm that updating to 1.2 and removing the workaround (pinned reactdns dependency) is working perfectly for me. |
Glad to hear that @clugg 🎉 |
Uh oh!
There was an error while loading. Please reload this page.
Hey! Love this project, greatly appreciate your time and effort!
However, I'm green-fielding a new project and we're going to use this package (again) for web-sockets. So the issue being, when attempting to run the websocket server (
php artisan websockets:serve
we are met by a nasty fatal error:This, I believe, is due to the recent https://github.com/reactphp/dns tag at v1.0.0. I am unfamiliar with the codebase so I do not have a commit id or pull request for this change. I'm just trying to put this out there. I'll do some digging soon-ish and see what I can find. But as of right now, a new project at Laravel:5.8.28 will have a fatal error running the socket server.
Thanks again and looking forward to collaborating to fix this :)
edit to include full stack:
edit to include commit that marked the class as final
Commit that changed Resolver class to final
The text was updated successfully, but these errors were encountered: