Part-DB.Part-DB-server/config
Pasquale D'Orsi 1cc1530b20
OEMSecrets provider interface v.1.0 (#679)
* OEMSecrets provider interface v.1.0

New class for interacting with the OEMSecrets (https://www.oemsecrets.com) API version 3.0.1.

* Refactored info provider to be stateless and independent from session, optimized Part-DB API usage, and fixed PHPStan issues.

Refactored info provider to be stateless and independent from session, now use Psr\Cache, fixed issues identified by PHPStan, additional minor enhancements and bug fixes.

* Prefix cache keys with oemsecrets_ to avoid key collissions

* Use uniqid with more entropy to reduce probability of collisions

* Made $resultData local as it is only used inside searchByKeyword

* Use the parameter name $id from interface declaration for getDetails to avoid problems with named arguments

* Use unicode modifier for preg_match to avoid problems when parameters contain non-unicode strings

* Various small code quality improvements

* Try to retrieve the part from the API in getDetails, if the DTO was not cached before

* Improved code formatting

* Channged OEMSecret default country to DE to be consistent with other default values

* Do not call gc_collect_cycles in the loop to process the results, but only after all processBatch calls

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-09-09 00:59:44 +02:00
..
packages Use jbtronics/translation-editor bundle instead of php-translation/symfony-bundle for profiler translation editing 2024-09-08 20:03:33 +02:00
routes Use jbtronics/translation-editor bundle instead of php-translation/symfony-bundle for profiler translation editing 2024-09-08 20:03:33 +02:00
banner.md Allow Latex equations in homepage banners and part comment. 2020-03-15 15:48:01 +01:00
bundles.php Use jbtronics/translation-editor bundle instead of php-translation/symfony-bundle for profiler translation editing 2024-09-08 20:03:33 +02:00
parameters.yaml Allow to emulate natural sorting on SQLite databases 2024-06-18 00:09:44 +02:00
permissions.yaml Added system to restrict permissions based on API token level 2023-08-28 21:20:59 +02:00
preload.php Updated symfony recipes. 2021-01-03 20:54:47 +01:00
routes.yaml Do not redirect missing API prefixed routes to a localized version 2023-10-01 16:07:42 +02:00
services.yaml OEMSecrets provider interface v.1.0 (#679) 2024-09-09 00:59:44 +02:00