Skip to content

[BUG] Uncaught TypeError: array_diff(): Argument #1 ($array) must be of type array, false given in /vendor/hyperf/di/src/Annotation/Scanner.php:190 #7706

@dickwu

Description

@dickwu

Execute the command and paste the result below.

Command: uname -a && php -v && composer info | grep hyperf && php --ri swoole

Linux chat 6.17.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 21:44:46 UTC 2025 x86_64 GNU/Linux
PHP 8.3.27 (cli) (built: Oct 27 2025 20:20:31) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.27, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.27, Copyright (c), by Zend Technologies
hyperf/async-queue                     3.1.64             A async queue component for hyperf.
hyperf/cache                           3.1.63             A cache component for hyperf.
hyperf/code-parser                     3.1.63             A code parser component for Hyperf.
hyperf/codec                           3.1.63             A codec component for Hyperf.
hyperf/collection                      3.1.64             Hyperf Collection package which come from illuminate/collections
hyperf/command                         3.1.64             Command for hyperf
hyperf/conditionable                   3.1.63             Hyperf Macroable package which come from illuminate/conditionable
hyperf/config                          3.1.63             An independent component that provides configuration container.
hyperf/constants                       3.1.63             A constants component for hyperf.
hyperf/context                         3.1.63             A coroutine/application context library.
hyperf/contract                        3.1.63             The contracts of Hyperf.
hyperf/coordinator                     3.1.63             Hyperf Coordinator
hyperf/coroutine                       3.1.65             Hyperf Coroutine
hyperf/database                        3.1.66             A flexible database library.
hyperf/database-sqlserver-incubator    dev-main 4d3a45c   The sqlserver driver for hyperf/database.
hyperf/db-connection                   3.1.66             A hyperf db connection handler for hyperf/database.
hyperf/devtool                         3.1.66             A Devtool for Hyperf.
hyperf/di                              3.1.65             A DI for Hyperf.
hyperf/dispatcher                      3.1.63             A HTTP Server for Hyperf.
hyperf/engine                          2.15.0             Coroutine engine provided by swoole.
hyperf/engine-contract                 1.14.0             Contract for Coroutine Engine
hyperf/event                           3.1.63             an event manager that implements PSR-14.
hyperf/exception-handler               3.1.63             Exception handler for hyperf
hyperf/framework                       3.1.63             A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.
hyperf/guzzle                          3.1.66             Swoole coroutine handler for guzzle
hyperf/http-message                    3.1.65             microservice framework base on swoole
hyperf/http-server                     3.1.65             A HTTP Server for Hyperf.
hyperf/logger                          3.1.63             A logger component for hyperf.
hyperf/macroable                       3.1.63             Hyperf Macroable package which come from illuminate/macroable
hyperf/memory                          3.1.63             An independent component that use to operate and manage memory.
hyperf/model-listener                  3.1.63             A model listener for Hyperf.
hyperf/paginator                       3.1.65             A paginator component for hyperf.
hyperf/pipeline                        3.1.63             Hyperf Macroable package which come from illuminate/pipeline
hyperf/pool                            3.1.66             An independent universal connection pool component.
hyperf/process                         3.1.63             A process component for hyperf.
hyperf/redis                           3.1.66             A redis component for hyperf.
hyperf/serializer                      3.1.63             A serializer component for Hyperf.
hyperf/server                          3.1.63             A base server library for Hyperf.
hyperf/session                         3.1.63             A session library
hyperf/snowflake                       3.1.63             A snowflake library
hyperf/stdlib                          3.1.63             A stdlib component for Hyperf.
hyperf/stringable                      3.1.65             Hyperf Stringable package which come from illuminate/support
hyperf/support                         3.1.65             A support component for Hyperf.
hyperf/tappable                        3.1.63             Hyperf Macroable package which come from illuminate/tappable
hyperf/testing                         3.1.63             Testing for hyperf
hyperf/translation                     3.1.63             An independent translation component, forked by illuminate/translation.
hyperf/validation                      3.1.66             hyperf validation
hyperf/view                            3.1.63             A view library for Hyperf.
hyperf/view-engine                     3.1.65            
hyperf/websocket-server                3.1.63             A websocket server library for Hyperf.

swoole

Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 6.1.6
Built => Jan 23 2026 09:01:11
host byte order => little endian
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 3.5.3 16 Sep 2025
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
curl-version => 8.14.1
zlib => 1.3.1
brotli => E16781312/D16781312
zstd => 1.5.7
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => enabled
coroutine_pgsql => enabled
coroutine_odbc => enabled
coroutine_sqlite => enabled
io_uring => enabled
execinfo => enabled

Directive => Local Value => Master Value
swoole.enable_library => On => On
swoole.enable_fiber_mock => Off => Off
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608

Description:

When running the command, it sometimes shows that problem.

Steps To Reproduce:

can not, only show in log

patch

dickwu@0a2426b

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions