Commit graph

404 commits

Author SHA1 Message Date
Jan Böhmer
42cb590c75 Fixed deprecations with api platform 2025-02-22 19:35:49 +01:00
Jan Böhmer
3247a97217 Removed "All" page length option for log tables, as this easily causes an out of memory situation on the server
You can easily have thousands of log entries, making it impossible to view them all at once.

This fixes #835
2025-02-01 23:44:07 +01:00
Jan Böhmer
8826ba6729 Fixed CSP rules to allow the WASM loading for the barcode scanner 2025-01-04 18:23:57 +01:00
Jan Böhmer
e223078af9 Added a custom function to make PostgresSQL searches case insensitive
This is required only for postgres as every other database is case invariant by default. But to achieve a portable way, we implement it via a custom DQL function.

This fixes issue #784
2024-12-02 00:17:54 +01:00
Jan Böhmer
7530e62dfa Do not format error messages as JSON, this makes log files easier to read and reduces line length which can makes problems on FPM
See issue #781
2024-12-01 22:33:32 +01:00
Sam Edwards
65b2f045ac
Responsive tweaks (#755)
* Change datatables markup to be responsive with BS5

* Responsive tweaks to single part info
2024-11-03 23:14:52 +01:00
Jan Böhmer
011e23f8e6 Added polish to language selector 2024-11-03 20:04:43 +01:00
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
Jan Böhmer
283a445198 Use jbtronics/translation-editor bundle instead of php-translation/symfony-bundle for profiler translation editing
This new bundle has less dependencies and less overhead
2024-09-08 20:03:33 +02:00
Jan Böhmer
235d572f8c Use DatetimeImmutable instead of DateTime wherever possible 2024-06-22 17:36:54 +02:00
Jan Böhmer
43a68b96ae Moved deprecated doctrine subscribers to doctrine event listeners 2024-06-21 23:41:22 +02:00
Jan Böhmer
8c45a40f9e Explicitly configure some deprecated configuration options 2024-06-19 23:47:38 +02:00
Jan Böhmer
272fe0516b Allow to emulate natural sorting on SQLite databases 2024-06-18 00:09:44 +02:00
Jan Böhmer
0a482da93e Use postgres native array_position function instead of our FIELD function and pass it as array literal instead of variadic function
Otherwise we will run into errors, that we can not give more than 100 arguments to a function
2024-06-17 23:13:04 +02:00
Jan Böhmer
9db822eabd Use natural sorting for string datatables columns when using postgres
The natural sorting solution is quite portable, so this should be possible for other database types too later
2024-06-17 21:38:16 +02:00
Jan Böhmer
6e9b337b49 Fixed regex function for postgres 2024-06-13 23:18:25 +02:00
Jan Böhmer
c58ff5861d Replaced the non standard IFNULL function which postgres does not know with the COALSCE function 2024-06-13 23:01:53 +02:00
Jan Böhmer
971bb92a8c Fixed error caused by ArrayType fields which is required by the webauthn bundle but was removed in doctrine/orm 4.0
We simple forward port the ArrayType class from orm 3.8 to fix this error
2024-06-10 21:11:11 +02:00
Jan Böhmer
8d816ab1ee Updated recipes to update docker related files 2024-03-10 18:08:22 +01:00
Jan Böhmer
c7fac06b65 Updated dependencies 2024-02-25 19:44:34 +01:00
Jan Böhmer
20be83c345 Allow to configure the currency to get prices in for the LCSCProvider 2024-02-22 23:57:57 +01:00
Jan Böhmer
95ef97fcc2 Added possibility to enable/disable the LCSC provider 2024-02-22 23:32:12 +01:00
Jan Böhmer
b37ae97673 Added chinese to navbar language picker 2024-02-06 21:50:07 +01:00
Jan Böhmer
f0519ae0b3 Return a 401 message with an JSON encoded body, if no authentication header is passed for an API request.
Also for browser requests, a flash message is shown in that case, prompting the user to authenticate.

This follows a suggestion from issue #494
2024-01-25 23:35:42 +01:00
Jan Böhmer
631c364179 Added option to redirect https requests to http via Part-DB
This is especially useful for the heroku demo instance, where the webserver can not do the automatic redirect
2024-01-25 22:58:52 +01:00
Jan Böhmer
046803b9c4
Added danish to prefered languages 2024-01-24 11:56:56 +01:00
Jan Böhmer
b12a2c6aab Added czech to language picker in navbar 2024-01-14 20:55:51 +01:00
Jan Böhmer
60f8e754c2 Use the DEFAULT_URI setting for SAML base url instead of auto determining it.
This should fix issue #436
2023-12-10 22:52:59 +01:00
Jan Böhmer
57423436ce Added options to use MySQL connection via SSL 2023-12-10 00:36:29 +01:00
Jan Böhmer
b5721dcfd0 Revert "Migrated deprecated doctrine event subsrcibers"
For some very very weird reasoning this cause issues with the ObjectNormalizer, which does not get an an serializer injected anymore.
When the EventLoggerSubscriber is a doctrine subscriber it seems that the serializer service is initialized (as its requested in constructor but not used) and later injected into the object normalizer.
When its an listener, this does not work anymore.
2023-12-07 00:17:27 +01:00
Jan Böhmer
f9d47e0865 Migrated deprecated doctrine event subscribers to doctrine event listeners 2023-12-05 22:08:07 +01:00
Jan Böhmer
d991643b0e Removed deprecated google 2FA option 2023-12-05 22:07:48 +01:00
Jan Böhmer
5faeb5dd56 Fixed problem with loading Fixtures on MySQL in combination with savepoints
We must now load the fixtures using custom command partdb:fixtures:load
2023-12-05 21:33:29 +01:00
Jan Böhmer
1911c62edd Upgraded DAMA doctrine test bundle 2023-12-03 23:58:19 +01:00
Jan Böhmer
64af418be2 Updated security-bundle recipe 2023-12-03 23:27:18 +01:00
Jan Böhmer
fd645a0bce Updated symfony-framework-bundle recipe
This removes the annotation reader services, which are not needed anymore
2023-12-03 23:04:35 +01:00
Jan Böhmer
abc554c7b8 Updated doctrine recipe 2023-12-03 22:44:55 +01:00
Jan Böhmer
07cc8a9534 Updated API platform recipe 2023-12-03 22:43:42 +01:00
Jan Böhmer
459ae163da Restrict the depth of the category tree shown inside KiCAD to improve performance
The depth can be controlled via the EDA_KICAD_CATEGORY_DEPTH env
2023-12-03 14:42:33 +01:00
Jan Böhmer
b76b2740a7 Use Embeddables for EDACategoryInfo instead of a json column 2023-11-30 19:13:32 +01:00
Jan Böhmer
d5f002ac20 Added basic ability to store EDA Data in a Part
But that might change, as it is currently not ideal
2023-11-30 12:54:30 +01:00
Jan Böhmer
22f8448c65 Added an very basic API implementation for KICAD 2023-11-28 14:24:22 +01:00
Jan Böhmer
6b0f0d31b9 Allow to authenticate using Authorization: Token header, which the KiCAD API uses 2023-11-28 14:24:22 +01:00
Jan Böhmer
18db20e511 Added the option env option to configure that all new attachment files should be downloaded by default 2023-11-26 23:44:02 +01:00
Jan Böhmer
83d43d931c Added a SAML_BEHIND_PROXY env, which must be set if Part-DB is behind a reverse proxy when using SAML
The php-saml library use its own logic to determine the current path, and we need to set the use_proxy_vars so that  it respects the proxy FORWARDED headers.

This should fix issue #436
2023-11-25 01:45:08 +01:00
Jan Böhmer
7f612bc371 Added ability to view part relations on a part info page 2023-11-15 00:44:45 +01:00
Jan Böhmer
717a9fb0a3 Fixed API Platform deprecations 2023-10-25 20:40:41 +02:00
Jan Böhmer
3c5a96ba5c Merge branch 'part-table-columns-config' 2023-10-08 21:50:43 +02:00
Jan Böhmer
79262972aa Renamed config env to TABLE_PARTS_DEFAULT_COLUMNS and updated documentation 2023-10-08 21:28:37 +02:00
Jan Böhmer
1369091b90 Moved column sorting and visibility logic to its own (non-shared) helper service 2023-10-08 21:07:22 +02:00