refactor: Framework code cleanup and improvements
- DI dependency graph improvements - Database connection updates - HTTP middleware chain optimizations - Routing middleware cleanup
This commit is contained in:
@@ -139,7 +139,7 @@ final readonly class DatabaseErrorStorage implements ErrorStorageInterface
|
||||
public function getPatternById(string $patternId): ?ErrorPattern
|
||||
{
|
||||
$sql = "SELECT * FROM error_patterns WHERE id = ?";
|
||||
$result = $this->connection->query($sql, [$patternId]);
|
||||
$result = $this->getConnection()->query($sql, [$patternId]);
|
||||
|
||||
if (empty($result)) {
|
||||
return null;
|
||||
@@ -183,7 +183,7 @@ final readonly class DatabaseErrorStorage implements ErrorStorageInterface
|
||||
LIMIT ?
|
||||
";
|
||||
|
||||
$results = $this->connection->query($sql, [$service, $limit]);
|
||||
$results = $this->getConnection()->query($sql, [$service, $limit]);
|
||||
|
||||
return array_map([$this, 'hydratePattern'], $results);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user