Allow to pass options to info providers
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / build (linux/amd64, amd64, ubuntu-latest) (push) Has been cancelled
Docker Image Build / build (linux/arm/v7, armv7, ubuntu-24.04-arm) (push) Has been cancelled
Docker Image Build / build (linux/arm64, arm64, ubuntu-24.04-arm) (push) Has been cancelled
Docker Image Build (FrankenPHP) / build (linux/amd64, amd64, ubuntu-latest) (push) Has been cancelled
Docker Image Build (FrankenPHP) / build (linux/arm/v7, armv7, ubuntu-24.04-arm) (push) Has been cancelled
Docker Image Build (FrankenPHP) / build (linux/arm64, arm64, ubuntu-24.04-arm) (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
Docker Image Build / merge (push) Has been cancelled
Docker Image Build (FrankenPHP) / merge (push) Has been cancelled

This commit is contained in:
Jan Böhmer 2026-04-27 22:37:05 +02:00
parent cf34de6772
commit 4f67f21b33
17 changed files with 55 additions and 46 deletions

View file

@ -278,12 +278,13 @@ class OEMSecretsProvider implements InfoProviderInterface
* and debugging with local JSON files. The results are processed, cached, and then sorted based
* on the keyword and specified criteria.
*
* @param string $keyword The part number to search for
* @param string $keyword
* @param array $options
* @return array An array of processed product details, sorted by relevance and additional criteria.
*
* @throws \Exception If the JSON file used for debugging is not found or contains errors.
*/
public function searchByKeyword(string $keyword): array
public function searchByKeyword(string $keyword, array $options = []): array
{
/*
oemsecrets Part Search API 3.0.1
@ -414,12 +415,13 @@ class OEMSecretsProvider implements InfoProviderInterface
* found in the cache, they are returned. If not, an exception is thrown indicating that
* the details could not be found.
*
* @param string $id The unique identifier of the provider or part.
* @param string $id
* @param array $options
* @return PartDetailDTO The detailed information about the part.
*
* @throws \Exception If no details are found for the given provider ID.
*/
public function getDetails(string $id): PartDetailDTO
public function getDetails(string $id, array $options = []): PartDetailDTO
{
$cacheKey = $this->getCacheKey($id);
$cacheItem = $this->partInfoCache->getItem($cacheKey);