当我尝试使用 pestPHP 创建链接测试时出现 Laravel 异常

问题描述 投票:0回答:1

我有这样的问题: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

请任何人都可以帮助我

php laravel xdebug pestphp
1个回答
0
投票

您要求

Request
clone
$request
方法内的
__clone
属性。这就是无限递归

© www.soinside.com 2019 - 2024. All rights reserved.