Skip to content

Class 'Hoa\Event\Bucket' not found #3907

@MGatner

Description

@MGatner

Bug report

PHPStan is crashing during analysis that includes a controller trait from the framework. PHPUnit tests pass fine using the trait and I can see nothing else about the trait that would cause an issue.

  • Version: 0.12.48
  • OS: Ubuntu 20.04
  • PHP: 7.4
  • Error:
Fatal error: Uncaught Error: Class 'Hoa\Event\Bucket' not found in phar:///opt/phpstan-error/vendor/phpstan/phpstan/phpstan/vendor/hoa/stream/Stream.php:237
Stack trace:
#0 phar:///opt/phpstan-error/vendor/phpstan/phpstan/phpstan/vendor/hoa/stream/Stream.php(468): Hoa\Stream\Stream->close()
#1 phar:///opt/phpstan-error/vendor/phpstan/phpstan/phpstan/vendor/hoa/consistency/Xcallable.php(128): Hoa\Stream\Stream::_Hoa_Stream()
#2 [internal function]: Hoa\Consistency\Xcallable->__invoke()
#3 {main}
  thrown in phar:///opt/phpstan-error/vendor/phpstan/phpstan/phpstan/vendor/hoa/stream/Stream.php on line 237

Code snippet that reproduces the problem

Because of the framework dependency I cannot recreate on PHPStan.org, but I have created a new repo that has a barebones setup and still causes the issue: https://github.com/MGatner/phpstan-error

Expected output

Expected not to crash :)

Possible other occurrences of this "missing class" issue:

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