Feb 8, 2024
0
Level 2
timeout, the RAM becomes full
Laravel Version
10.43
PHP Version
8.2.8
Database Driver & Version
mysql 8.0 phpmyadmin with laragon
Description
"inertiajs/inertia-laravel": "^0.6.11",
"laravel/jetstream": "^4.0",
"laravel/sanctum": "^3.3.3",
"laravel/framework": "10.42.0", // It works well on version 10.42.0, but if I upgrade it to 10.43.0 and try to log in after entering the registration data and pressing the login button, the timeout error appears.
The Issue only exists in: 10.43.0 I searched but did not find any justification for this and no error is recorded in the log
Steps To Reproduce
Let me say that I created a completely new project and when I used addGlobalScope the problem starts and only in version: 10.43.0 Example of the code causing the problem:
// User.php :
protected static function booted(): void
{
static::addGlobalScope(new SumTotalBalance);
}
public function callrecords()
{
return $this->hasMany(CallRecord::class);
}
// SumTotalBalance.php
public function apply(Builder $builder, Model $model)
{
$builder->withCount(['callrecords as callrecords_followse' => fn ($q) => $q->whereBetween('created_at', [now()->startOfDay(), now()->endOfDay()])]);
}
The databases are empty and there are no records
The exact same code works perfectly on 10.42.0
Please or to participate in this conversation.