---
title: "Breaking: Extended ContactRepository::findByPid() signature"
manual: "Academic Contacts for Pages"
version: "3.0"
permalink: "https://docs.typo3.org/permalink/fgtclb/academic-contacts4pages:breaking-ace-250-academic-contacts4pages@3.0"
source: "Changelog/2.4/Breaking-ExtendedContactRepositorySignature.rst"
rendered: "2026-10-26T17:55:07+00:00"
---

# Breaking: Extended `ContactRepository::findByPid()` signature {#breaking-ace-250-academic-contacts4pages}

## Description {#description}

To support the new **Show hidden records** plugin option,
`\FGTCLB\AcademicContacts4pages\Domain\Repository\ContactRepository`
changed one method:

-   `findByPid(int $pid, bool $showHidden = false): QueryResultInterface`.
    The optional parameter `$showHidden` was appended.

With `$showHidden` set to `true`, the query ignores only the hidden
flag of the contacts. Deleted records, start and end time and frontend user
groups still apply. The contacts content element passes its
`settings.showHiddenRecords`.

## Impact {#impact}

Calls of the repository keep working: the new parameter has a default value.

A class that extends `ContactRepository` and overrides `findByPid()`
with the old signature fails with a PHP fatal error, because the method of the
subclass no longer accepts every parameter of the parent method.

## Affected Installations {#affected-installations}

Installations that extend
`\FGTCLB\AcademicContacts4pages\Domain\Repository\ContactRepository` and
override `findByPid()`. All other installations are unaffected.

## Migration {#migration}

Add the parameter to the overriding method and pass it on:

```php
public function findByPid(int $pid, bool $showHidden = false): QueryResultInterface
{
    // ...
    return parent::findByPid($pid, $showHidden);
}
```
