Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Statistics\DnsResolver may not inherit from final class #216

@belzaaron

Description

@belzaaron

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:

Symfony\Component\Debug\Exception\FatalErrorException  : Class BeyondCode\LaravelWebSockets\Statistics\DnsResolver may not inherit from final class (React\Dns\Resolver\Resolver)

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:

PS D:\WebApps\squeegee> php artisan websockets:serve
PHP Fatal error:  Class BeyondCode\LaravelWebSockets\Statistics\DnsResolver may not inherit from final class (React\Dns\Resolver\Resolver) in D:\WebApps\squeegee\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 D:\WebApps\squeegee\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 D:\WebApps\squeegee\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)", "D:\WebApps\squeegee\vendor\beyondcode\laravel-websockets\src\Statistics\DnsResolver.php")
      D:\WebApps\squeegee\vendor\filp\whoops\src\Whoops\Run.php:433

  2   Whoops\Run::handleShutdown()
      [internal]:0

edit to include commit that marked the class as final

Commit that changed Resolver class to final

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions