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

heimrichhannot / contao-utils-bundle / 38542847508

14 Oct 2026 09:30AM UTC coverage: 84.066% (+4.2%) from 79.825%
38542847508

Pull #108

github

koertho
address review comments on resolver and tokenizer

- Look up stemmer and normalizer in explicit methods that check the service
  against its interface, instead of a generic helper
- Transliterate letters without a decomposition into base letter and accent
  (æ, ø, œ, ð, þ, ł, đ, ı), accented letters were already folded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pull Request #108: add search vector field

392 of 407 new or added lines in 16 files covered. (96.31%)

1588 of 1889 relevant lines covered (84.07%)

8.98 hits per line

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

66.67
/src/SearchVector/SearchVectorDataContainer.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\SearchVector;
4

5
use Contao\DataContainer;
6

7
/**
8
 * Minimal data container for resolving field values outside the backend, e.g. in the rebuild command.
9
 *
10
 * Options callbacks get table, id and the current record, nothing else. getCurrentRecord() returns the given row
11
 * without the permission check of the backend driver, as there is usually no logged-in user.
12
 *
13
 * @internal
14
 */
15
class SearchVectorDataContainer extends DataContainer
16
{
17
    /**
18
     * @param array<string, mixed> $row
19
     */
20
    public function __construct(string $table, private readonly array $row)
21
    {
22
        parent::__construct();
17 ✔
23

24
        $this->strTable = $table;
17 ✔
25
        $this->intId = (int) ($row['id'] ?? 0);
17 ✔
26
        // For callbacks that still read the deprecated $dc->activeRecord
27
        $this->objActiveRecord = (object) $row;
17 ✔
28
    }
29

30
    public function getCurrentRecord(int|string|null $id = null, ?string $table = null): ?array
31
    {
32
        if ((!$id || (int) $id === $this->intId) && (!$table || $table === $this->strTable)) {
1 ✔
33
            return $this->row;
1 ✔
34
        }
35

NEW
36
        return parent::getCurrentRecord($id, $table);
×
37
    }
38

39
    public function getPalette(): string
40
    {
NEW
41
        return '';
×
42
    }
43

44
    protected function save($varValue): void
45
    {
NEW
46
    }
×
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc