Commit graph

4701 commits

Author SHA1 Message Date
Sebastian Almberg
02869f2aa7 Use Symfony's built-in ETag handling for HTTP caching
Replace manual If-None-Match comparison with Response::setEtag() and
Response::isNotModified(), which properly handles ETag quoting, weak
vs strong comparison, and 304 response cleanup. Fixes PHPStan return
type error and CI test failures.
2026-02-08 15:35:49 +01:00
Sebastian Almberg
185107f4e1 Fix testPartDetailsPart2 to actually test Part 2
The test was requesting /parts/1.json instead of /parts/2.json and had
Part 1's expected data. Now tests Part 2 which inherits EDA info from
its category and footprint, verifying the inheritance behavior.
2026-02-08 11:09:54 +01:00
Sebastian Almberg
1cefffe03f Fix 304 response body, parse_url safety, and location/stock consistency
- Use empty Response instead of JsonResponse(null) for 304 Not Modified
  to avoid sending "null" as response body
- Guard parse_url() result with is_string() since it can return false
  for malformed URLs
- Move storage location tracking inside the availability check so
  expired and unknown-quantity lots don't contribute locations
2026-02-08 10:46:53 +01:00
Sebastian Almberg
789f17a88d Add KiCadHelper unit tests and fix PDF detection for external URLs
- Add comprehensive KiCadHelperTest with 14 test cases covering:
  - Stock quantity calculation (zero, single lot, multiple lots)
  - Stock exclusion of expired and unknown-quantity lots
  - Storage location display (present, absent, multiple)
  - Datasheet URL resolution by type name, attachment name, PDF extension
  - Datasheet fallback to Part-DB URL when no match
  - "Data sheet" (with space) name variant matching
- Fix PDF extension detection for external attachments (getExtension()
  returns null for external-only attachments, now also parses URL path)
2026-02-08 10:37:37 +01:00
Sebastian Almberg
a40ffea95e Add stock quantity, datasheet URL, and HTTP caching to KiCad API
- Add Stock field showing total available quantity across all part lots
- Add Storage Location field when parts have stored locations
- Resolve actual datasheet PDF from attachments (by type name, attachment
  name, or first PDF) instead of always linking to Part-DB page
- Keep Part-DB page URL as separate "Part-DB URL" field
- Add ETag and Cache-Control headers to all KiCad API endpoints
- Support conditional requests (If-None-Match) returning 304
- Categories/part lists cached 5 min, part details cached 1 min
2026-02-08 09:57:10 +01:00
Jan Böhmer
c2a51e57b7
New Crowdin updates (#1227)
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (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
* New translations security.en.xlf (French)

* New translations security.en.xlf (Spanish)

* New translations security.en.xlf (Czech)

* New translations security.en.xlf (Italian)

* New translations security.en.xlf (Polish)

* New translations security.en.xlf (Russian)

* New translations frontend.en.xlf (French)

* New translations frontend.en.xlf (Spanish)

* New translations frontend.en.xlf (Czech)

* New translations frontend.en.xlf (Italian)

* New translations frontend.en.xlf (Polish)

* New translations frontend.en.xlf (Russian)
2026-02-07 19:14:35 +01:00
Jan Böhmer
cae0cd8ac1 Bumped version to 2.6.0
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
2026-02-07 19:07:37 +01:00
Copilot
f5841cc697
Remove outdated file source and path notes from translation files (#1225)
* Initial plan

* Remove outdated file source and path notes from all translation files

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Preserve XML declaration format with double quotes

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2026-02-07 18:33:31 +01:00
Jan Böhmer
8104c474b7
New translations messages.en.xlf (English) (#1226) 2026-02-07 18:13:01 +01:00
Jan Böhmer
dcdc990af1 Fixed unnecessary colon in english translation 2026-02-07 17:33:44 +01:00
Jan Böhmer
aec53bd1dd Do not output HTML chars in translations escaped in CDATA to ensure consistentcy with crowdin XMLs
This should avoid some unnecessary diffs in the future
2026-02-07 17:33:32 +01:00
Jan Böhmer
81dde6fa68 Only allow to set the DELETE method via HTTP method overriding
This hardens security
2026-02-07 17:18:31 +01:00
Jan Böhmer
b144f5e383 Updated dependencies 2026-02-07 17:13:49 +01:00
Jan Böhmer
fd4eb72eb2 Merge remote-tracking branch 'origin/master' 2026-02-07 17:11:36 +01:00
Jan Böhmer
44204b9dbb
New Crowdin updates (#1212)
* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (English)

* New translations validators.en.xlf (Chinese Simplified)

* New translations frontend.en.xlf (Chinese Simplified)

* New translations frontend.en.xlf (Chinese Simplified)

* New translations security.en.xlf (Ukrainian)

* New translations validators.en.xlf (Ukrainian)

* New translations frontend.en.xlf (Ukrainian)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (Danish)
2026-02-07 17:11:32 +01:00
Jan Böhmer
7bffe66b73 Removed Translator that became obsolete with Symfony 7.2 2026-02-07 17:11:05 +01:00
Jan Böhmer
061af28c48 Fixed phpstan issues in GenericWebProvider 2026-02-07 17:07:53 +01:00
Jan Böhmer
851055bdb4 Merge branch 'generic_webshop'
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (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
2026-02-03 23:20:17 +01:00
Jan Böhmer
7d19ed3ca8 Try to get a category from a webshop based on the breadcrumbs 2026-02-03 23:20:13 +01:00
Jan Böhmer
b48de83a32 Use brick schema to implement GenericWebProvider
This is less error prone than our own parser and also allows to parse Microdata and rdfa lite to support more webshops
2026-02-03 23:04:18 +01:00
Jan Böhmer
518953ad45 Merge branch 'master' into generic_webshop 2026-02-03 21:51:27 +01:00
Jan Böhmer
ea748dc469 Use cache.app adapter for settings content cache 2026-02-03 21:49:31 +01:00
Jan Böhmer
c027f9ab03 Updated dependencies 2026-02-03 21:48:17 +01:00
Jan Böhmer
bc28eb9473 Remove lowercase version of Makefile that causes warnings on Windows 2026-02-03 21:42:50 +01:00
Jan Böhmer
7eafa7da14 Merge branch 'feature/update-manager' 2026-02-03 21:41:44 +01:00
Jan Böhmer
1601382b41 Added translation for downgrading in progress title 2026-02-03 20:55:31 +01:00
Jan Böhmer
5ceadc8353 Use a special settings cache that lives in cache.system to ensure that it is properly cleared on cache clear 2026-02-03 20:49:25 +01:00
Jan Böhmer
36e105afa8 Merge remote-tracking branch 'Sebbeben/feature/update-manager' into feature/update-manager 2026-02-03 20:34:09 +01:00
Jan Böhmer
c34acfe523 Allow to view progress view while update is running 2026-02-03 20:34:03 +01:00
Sebastian Almberg
e83e7398a2 Improve .env comments for Update Manager settings
Clarify that 0=enabled and 1=disabled for DISABLE_WEB_UPDATES
and DISABLE_BACKUP_RESTORE environment variables.
2026-02-03 20:16:24 +01:00
Sebastian Almberg
984529bc79 Add Update Manager documentation
- Add comprehensive update_manager.md with feature overview
- Document CLI commands (partdb:update, partdb:maintenance-mode)
- Document web interface and permissions
- Add security considerations and troubleshooting
- Update console_commands.md with new commands
2026-02-03 11:55:53 +01:00
Jan Böhmer
cad5261aba Fixed phpstan issues 2026-02-02 23:26:18 +01:00
Jan Böhmer
a755287c3b Make maintenance command available under partdb:maintenance-mode to make it more consistent with other hyphen command tools 2026-02-02 23:09:52 +01:00
Jan Böhmer
9ca1834d9b Removed unused translations 2026-02-02 23:07:24 +01:00
Jan Böhmer
1a06432cec Removed custom yes and no translations 2026-02-02 22:16:26 +01:00
Jan Böhmer
58d574a33a Only use the simple maintenance page, and made this a bit more generic 2026-02-02 22:10:52 +01:00
Jan Böhmer
1adfec16e2 Added an console command to turn maintenance mode on or off 2026-02-02 21:53:55 +01:00
Jan Böhmer
903716ad62 Added missing translations 2026-02-02 21:39:01 +01:00
Jan Böhmer
427778e4eb Moved "Cant auto update panel higher" to make it more visible 2026-02-02 21:37:04 +01:00
Jan Böhmer
9b0841081b We are in development of 2.6.0 2026-02-02 21:30:02 +01:00
Jan Böhmer
f327688f0a Put update manager under /system route instead of admin 2026-02-02 21:29:07 +01:00
Jan Böhmer
0e5a73b6f4 Add nonce to inline script in progress bar 2026-02-02 21:22:06 +01:00
Jan Böhmer
d06df4410d Disable the web updater and web backup restore for now
This can become default, when there is more experience with the web updated
2026-02-02 21:18:44 +01:00
Jan Böhmer
883e3b271d Fixed git commit hash logic 2026-02-02 21:02:08 +01:00
Jan Böhmer
29a08d152a Use version info from updateChecker to be consistent 2026-02-02 20:52:42 +01:00
Jan Böhmer
2b94ff952c Use different symbol for update manager 2026-02-02 20:49:21 +01:00
Jan Böhmer
7a856bf6f1 Try to emulate nohup behavior on windows 2026-02-02 20:37:02 +01:00
Jan Böhmer
720c1e51e8 Improved UpdateExecutor 2026-02-02 20:28:17 +01:00
Jan Böhmer
1ccc3ad440 Extracted logic used by both BackupManager and UpdateExecutor to new service 2026-02-02 19:48:27 +01:00
Jan Böhmer
68ff0721ce Merged functionality from UpdateAvailableManager and UpdateChecker 2026-02-02 18:44:44 +01:00