我有这样的问题:Xdebug 检测到可能的无限循环,并中止了堆栈深度为“256”帧的脚本
当我尝试为链接创建测试时:
$response = $this->get('/odata/dim_regions');
Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames
at vendor\symfony\http-foundation\Request.php:501
497▕ * are most of the time sub-requests of the main one.
498▕ */
499▕ public function __clone()
500▕ {
➜ 501▕ $this->query = clone $this->query;
502▕ $this->request = clone $this->request;
503▕ $this->attributes = clone $this->attributes;
504▕ $this->cookies = clone $this->cookies;
505▕ $this->files = clone $this->files;
1 vendor\symfony\http-foundation\Request.php:501
2 vendor\symfony\http-foundation\Request.php:502
我使用PestPHP
请任何人都可以帮助我
您要求
Request
到 clone
其 $request
方法内的 __clone
属性。这就是无限递归