• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daycry / doctrine / 19702960321

26 Nov 2025 12:00PM UTC coverage: 76.782% (-1.1%) from 77.852%
19702960321

push

github

daycry
Features

Acknowledged. Here’s a concise PR description you can use.

Title
Standardize docs (English + style), harden DataTables builder, and expand test coverage

Summary

Aligns all documentation to English with consistent structure and operator tables.
Strengthens DataTables builder filtering and search logic to prevent invalid DQL.
Adds targeted tests covering operator parsing, LIKE synonyms, numeric column handling, and combined filters.
Cleans up non-doc files from docs.
Changes

Docs:
datatables.md: rewritten in English; unified sections; operator table (Mode/Pattern/Description); examples and best practices.
search_modes.md: aligned style; added Key Concepts/Notes; included LIKE synonyms.
debug_toolbar.md: standardized with Key Concepts, Setup, Usage, Notes.
installation.md: added Key Concepts and Notes.
configuration.md: added Key Concepts, Publish Configuration, and Notes.
second_level_cache.md: added Key Concepts and Notes; clarified backend reuse and TTL.
README: reference note under “Using DataTables” pointing to datatables.md.
Removed docs/DATATABLES_FIX.md and docs/TEST_COVERAGE.md (non-doc content).
Code (existing feature refinements referenced in tests/documentation):
DataTables builder: operator parsing extracted and validated; numeric/invalid field guard via isValidDQLField; withSearchableColumns support; consistent case-insensitive handling for LIKE/equality.
Tests:
DataTableTest.php: added
Invalid operator fallback ([XYZ]am → LIKE %am%).
LIKE synonyms ([LIKE]am, [%%]am).
Global search skips numeric column identifiers.
Case-insensitive behavior with OR, IN, ><.
Combined global LIKE + per-column operator filter.
Full suite passes: 74 tests, 227 assertions, 5 skipped.
Motivation

Ensure documentation clarity and consistency for contributors/users.
Prevent runtime DQL errors from malformed DataTables params.
Improve reliability with explicit tests for edge cases and operator handling.
Impact

No breaking changes to public APIs.
Docum... (continued)

46 of 66 new or added lines in 4 files covered. (69.7%)

2 existing lines in 1 file now uncovered.

377 of 491 relevant lines covered (76.78%)

19.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Debug/Toolbar/Collectors/DoctrineConnectionProxy.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Daycry\Doctrine\Debug\Toolbar\Collectors;
6

7
use Doctrine\DBAL\Connection;
8
use Doctrine\DBAL\Result;
9

10
/**
11
 * Proxy for Doctrine DBAL Connection to log queries for the Debug Toolbar.
12
 */
13
class DoctrineConnectionProxy
14
{
15
    private DoctrineCollector $collector;
16
    private Connection $conn;
17

18
    public function __construct(Connection $conn, DoctrineCollector $collector)
19
    {
UNCOV
20
        $this->conn      = $conn;
×
UNCOV
21
        $this->collector = $collector;
×
22
    }
23

24
    /**
25
     * Executes an SQL query and logs it.
26
     *
27
     * @param mixed      $sql
28
     * @param mixed      $types
29
     * @param mixed|null $queryCacheProfile
30
     */
31
    public function executeQuery($sql, array $params = [], $types = [], $queryCacheProfile = null): Result
32
    {
33
        $start  = microtime(true);
×
34
        $result = $this->conn->executeQuery($sql, $params, $types, $queryCacheProfile);
×
35
        $end    = microtime(true);
×
36
        $this->collector->addQuery([
×
37
            'sql'         => $sql,
×
38
            'params'      => $params,
×
39
            'types'       => $types,
×
40
            'start'       => $start,
×
41
            'end'         => $end,
×
42
            'duration'    => $end - $start,
×
43
            'executionMS' => ($end - $start) * 1000,
×
44
        ]);
×
45

46
        return $result;
×
47
    }
48

49
    /**
50
     * Executes an SQL statement and logs it.
51
     *
52
     * @param mixed $sql
53
     */
54
    public function executeStatement($sql, array $params = [], array $types = []): int
55
    {
56
        $start  = microtime(true);
×
57
        $result = $this->conn->executeStatement($sql, $params, $types);
×
58
        $end    = microtime(true);
×
59
        $this->collector->addQuery([
×
60
            'sql'         => $sql,
×
61
            'params'      => $params,
×
62
            'types'       => $types,
×
63
            'start'       => $start,
×
64
            'end'         => $end,
×
65
            'duration'    => $end - $start,
×
66
            'executionMS' => ($end - $start) * 1000,
×
67
        ]);
×
68

69
        return $result;
×
70
    }
71

72
    /**
73
     * Forwards all other method calls to the underlying connection.
74
     *
75
     * @param string $name
76
     * @param array  $arguments
77
     */
78
    public function __call($name, $arguments): mixed
79
    {
80
        return $this->conn->{$name}(...$arguments);
×
81
    }
82
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc