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
b99777cde1
Return a 404 message, instead of creating an 500 Runtime exception, when a file associated with an attachment is not existing.
...
This fails more gracefully, and do not pollute log files.
2024-08-24 15:49:45 +02:00
Jan Böhmer
8193e7a68e
Allow to show attachment IDs in attachment table
2024-08-24 15:48:50 +02:00
Jan Böhmer
7fc3153dde
Fixed filter logic for exclusion of entities. Before parts with null values as property value were wrongly not shown
...
This fixes issue #658
2024-08-23 22:58:04 +02:00
Jan Böhmer
5231dbd6e7
Remove project path in twig label error messages to prevent information leakage
2024-08-23 22:28:29 +02:00
Jan Böhmer
77671550a7
Fail gracefully, when an exception occurs during rendering of the example labels for label profiles
...
This fixes issue #671
2024-08-23 22:15:29 +02:00
Jan Böhmer
e231404128
Load HTMLExtension in SandboxedTwig, so that the data_uri filter can be used in twig labels
...
This fixes issue #665
2024-08-23 22:06:37 +02:00
frank-f
fd521acaa4
Update LCSCProvider field for real datasheet URL ( #670 )
2024-08-21 17:35:55 +02:00
Jan Böhmer
21c3c45150
Introduced a custom ExponentialNumberType for parameter values
...
This type shows small values in exponential notation instead of rounding it to zero.
2024-07-28 23:18:36 +02:00
Jan Böhmer
1aee0a91c0
Workaround symfonys issue with NumberType and negative exponential e-notation number
...
This fixes issue #649
2024-07-28 22:52:44 +02:00
Jan Böhmer
d6ff22fc44
Show in server info page which natural sorting method is used
...
This should ease debugging
2024-07-28 14:13:34 +02:00
Jan Böhmer
19e5d302f4
Fixed detection on mariadb natsort capabilities on distributions which use the 5.5.5- prefix for MariaDB version
2024-06-23 21:13:37 +02:00
Jan Böhmer
88ef1788ac
Add small time differences to the datafixtures log entries, to get a defined order
2024-06-23 18:03:54 +02:00
Jan Böhmer
528d0c7a26
Added tests for TimeTravel service and fixed applyEntry function for embeddded fields
2024-06-23 17:43:10 +02:00
Jan Böhmer
c68a647e75
Added missing tests for LogEntryRepository
2024-06-23 16:07:42 +02:00
Jan Böhmer
e0e4b74b6f
Fixed getElementExistedAtTimestamp function()
2024-06-23 15:46:10 +02:00
Jan Böhmer
204178740c
Started adding basic tests for LogEntryRepository
2024-06-23 15:41:57 +02:00
Jan Böhmer
8fdf37261d
Fixed phpstan issues
2024-06-23 00:42:49 +02:00
Jan Böhmer
06c8e584a4
Allow to import attachments and parameters via entity import
...
This fixes issue #363
2024-06-23 00:41:25 +02:00
Jan Böhmer
bbf7222a6a
Improved EntityExporter to handle recursive exports
2024-06-23 00:11:38 +02:00
Jan Böhmer
f6e955b487
Hide mouser parts with an invalid product ID to avoid the issue described in #616
2024-06-22 23:37:50 +02:00
Jan Böhmer
6f91ff1f28
Fixed --overwrite option of the backup command not working
...
This fixes issue #635
2024-06-22 22:59:16 +02:00
Jan Böhmer
b7b941e3a1
Fixed error handling of structural data import
...
This was the reason for the exception in #632
2024-06-22 22:55:15 +02:00
Jan Böhmer
445229976f
Allow locales like de_DE in removeLocaleFromPath function
...
Related to issue #563
2024-06-22 19:48:11 +02:00
Jan Böhmer
eb02404d49
Fixed typing of TextConstraint
2024-06-22 19:06:07 +02:00
Jan Böhmer
c780c0bd92
Fixed "__partLot already defined" error when using a between filter for amountSum on postgres
2024-06-22 19:03:30 +02:00
Jan Böhmer
8f631cae63
Split up NumberConstraint and DateTimeConstraint for better type enforcement
2024-06-22 18:53:26 +02:00
Jan Böhmer
a4f440656a
Fixed timetravel feature on postgresql
2024-06-22 17:55:54 +02:00
Jan Böhmer
235d572f8c
Use DatetimeImmutable instead of DateTime wherever possible
2024-06-22 17:36:54 +02:00
Jan Böhmer
002d29a53e
Fixed PHPstan issues
2024-06-22 16:53:59 +02:00
Jan Böhmer
5074e2beac
Fixed phpunit tests
2024-06-22 00:44:59 +02:00
Jan Böhmer
20f32c7f12
Applied rector suggestions
2024-06-22 00:31:43 +02:00
Jan Böhmer
6821e668e4
Do not inject ObjectNormalizer into StructuralElementDenormalizer directly
2024-06-21 23:41:52 +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
8ce93a028a
Removed deprecated interface from SkippableItemNormalizer
2024-06-19 23:58:15 +02:00
Jan Böhmer
028307b63c
Added some return typehints to functions who missed them
2024-06-19 23:56:08 +02:00
Jan Böhmer
b4d8d31c2d
partUnit column in part datatable now shows the correct data
...
This fixes issue #630
2024-06-19 23:28:53 +02:00
Jan Böhmer
bb2559edc1
Fixed PHPstan issue
2024-06-18 23:31:24 +02:00
Jan Böhmer
e3dfbf0e95
Support postgres in the backup command
2024-06-18 23:02:33 +02:00
Jan Böhmer
3f471d0c73
Natsort MPN column in part datatables
2024-06-18 22:34:29 +02:00
Jan Böhmer
4a706ab707
Do not natsort description fields as these can become very long
2024-06-18 22:34:13 +02:00
Jan Böhmer
123372d93f
Allow to emulate natural sort on mysql platforms
2024-06-18 21:42:00 +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
289c9126d0
Use Natural_SORT_KEY for natural sorting on MariaDB database which support that
...
This resolves issue #243 and #402
2024-06-17 23:29:38 +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
8bb8118d9f
Use natural sorting for trees and others repository functions
2024-06-17 22:33:40 +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
8a42dfa154
Use the FIELD function on postgres for order by field value
2024-06-17 21:20:23 +02:00
Jan Böhmer
d7a7e22e5a
Fixed lessThanDesired Constraint for postgresql
2024-06-17 21:16:46 +02:00
Jan Böhmer
4f75e2641b
Define a custom FIELD function to sort tables by list of ids without the emulation via string operations
2024-06-16 23:46:40 +02:00