PHP - 允许的内存大小耗尽(Zend Framework Expressive)

PHP - Allowed memory size exhausted (Zend Framework Expressive)

由于我的 zend 表达项目中的一个新动作,我目前正在苦苦挣扎。 谁能告诉我,在哪里看? 我试图注释掉新动作中的所有代码,但对于这个新动作的路由,我总是不断收到以下错误。

有人可以帮助我吗?如果您需要,我会提供更多代码。 非常感谢!!!

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in D:\Apache24\htdocs\vendor\zendframework\zend-servicemanager\src\ServiceManager.php on line 200

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

内存不足不是我的问题。

我在 ConfigProvider 中犯了一个很大的错误。而不是像这样声明工厂:

DashboardAction::class => DashboardActionFactory::class,

刚才误写了:

DashboardAction::class => DashboardAction::class,

这是一种无限循环,解释了内存溢出。