server
server copied to clipboard
fix: Correctly ignore lazy ghost initialization in debug warning about direct constructor call
- Resolves: #53463
Summary
It appears that ReflectionClass does not appear in the trace in the end, so we need to match the closure to be sure we’re fine. I use preg_match so that it does not break when the line number of the closure changes.
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [ ] Documentation (manuals or wiki) has been updated or is not required
- [ ] Backports requested where applicable (ex: critical bugfixes)