* New translations messages.en.xlf (Italian)
* New translations validators.en.xlf (Italian)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (German)
* New translations messages.en.xlf (English)
* feat(parts table): add eda reference prefix and value columns
* Use better labels for column names and made it visible as default column selection
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* 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
* 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)
* 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
* 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.
* 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.
* Add configurable KiCad field export for part parameters
Add a kicad_export checkbox to parameters, allowing users to control
which specifications appear as fields in the KiCad HTTP library API.
Parameters with kicad_export enabled are included using their formatted
value, without overwriting hardcoded fields like description or Stock.
* Add partdb:kicad:populate command for bulk KiCad path assignment
Console command that populates KiCad footprint/symbol paths on Footprint
and Category entities based on name-to-library mappings. Supports dry-run,
force overwrite, and list modes. Includes 130+ footprint mappings and 30+
category symbol mappings for KiCad 9.x standard libraries.
* Add CSV import support for EDA/KiCad fields
Add user-friendly column aliases (kicad_symbol, kicad_footprint,
kicad_reference, kicad_value, eda_exclude_bom, etc.) to the CSV import
system. Users can now bulk-set KiCad symbols, footprints, and other EDA
metadata via CSV/Excel import without knowing the internal dot notation.
* Add batch EDA field editing from parts table
Users can now select multiple parts in any parts table and batch-edit
their EDA/KiCad fields (symbol, footprint, reference prefix, value,
visibility, exclude from BOM/board/sim). Each field has an "Apply"
checkbox so users control exactly which fields are changed.
* Remove unused counter variable in BatchEdaController
* Fix PHPStan errors in PopulateKicadCommand and BatchEdaController
Add @var type annotations for Doctrine repository findAll() calls so
PHPStan can resolve getEdaInfo() on Footprint/Category entities. Fix
array return type for numeric-string keys and add explicit callback to
array_filter to satisfy strict rules.
* Fix batch EDA edit: required validation and pre-populate shared values
- Add required=false to TriStateCheckboxType fields so HTML5 validation
doesn't force users to check visibility/BOM/board checkboxes
- Pre-populate form fields when all selected parts share the same EDA
value, so users can see current state before editing
* Add KiCad API v2, orderdetail export control, EDA status indicator, BOM improvements
- Add KiCad API v2 endpoints (/kicad-api/v2) with volatile field support
for stock and storage location (shown but not saved to schematic)
- Add kicad_export flag to Orderdetail entity for per-supplier SPN control
(backward compatible: if no flag set, all SPNs exported as before)
- Add EDA completeness indicator column in parts datatable (bolt icon)
- Add ?minimal=true query param for faster category parts loading
- Improve category descriptions (use comment instead of URL when available)
- Improve BOM importer multi-footprint support: merge entries by Part-DB
part ID when linked, tracking footprint variants in comments
- Fix KiCost manf/manf# fields always present (not conditional on orderdetails)
- Fix duplicate getEdaInfo() call in shouldPartBeVisible
- Consolidate supplier SPN and KiCost field generation into single loop
* Fix kicad_export column default for SQLite compatibility
Add options default to ORM column definition so schema:update
works correctly on SQLite test databases.
* Make EDA status bolt icon clickable to open EDA settings tab
* Fix EDA bolt link to correctly open EDA tab via data-turbo=false
* Add configurable datasheet URL mode for KiCad API
New setting "Datasheet field links to PDF" in KiCad EDA settings.
When enabled (default), the datasheet field resolves to the actual
PDF attachment URL. When disabled, it links to the Part-DB page
(old behavior). Configurable via settings UI or EDA_KICAD_DATASHEET_AS_PDF env var.
* Fix settings crash when upgrading: make datasheetAsPdf nullable
The settings bundle stores values in the database. When upgrading from
a version without datasheetAsPdf, the stored JSON lacks this key,
causing a TypeError when assigning null to a non-nullable bool.
Making it nullable with a fallback in KiCadHelper fixes the upgrade path.
* Add functional tests for KiCad API v2 and batch EDA controller
- KiCadApiV2ControllerTest: root, categories, parts, volatile fields,
v1 vs v2 comparison, cache headers, 304 conditional request, auth
- BatchEdaControllerTest: page load, empty redirect, form submission
* Fix test failures: correct ids format and anonymous access assertion
* Improve test coverage for BatchEdaController
Add tests for: applying all EDA fields at once, custom redirect URL,
and verifying unchecked fields are skipped.
* Address PR review: rename to eda_visibility, merge migrations, API versioning
Changes based on jbtronics' review of PR #1241:
- Rename kicad_export -> eda_visibility (entities, forms, templates,
translations, tests) with nullable bool for system default support
- Merge two database migrations into one (Version20260211000000)
- Rename createCachedJsonResponse -> createCacheableJsonResponse
- Change bool $apiV2 -> int $apiVersion with version validation
- EDA visibility field only shown for part parameters, not other entities
- PopulateKicadCommand: check alternative names of footprints/categories
- PopulateKicadCommand: support external JSON mapping file (--mapping-file)
- Ship default mappings JSON at contrib/kicad-populate/default_mappings.json
- Add system-wide defaultEdaVisibility setting in KiCadEDASettings
- Add KiCad HTTP Library v2 spec link in controller docs
* Fix duplicate loadMappingFile method causing PHP fatal error
* Add tests for mapping file and alternative name matching, update populate command docs
Add 5 new tests for PopulateKicadCommand covering:
- Custom mapping file overriding defaults
- Invalid JSON mapping file error handling
- Missing mapping file error handling
- Footprint alternative name matching
- Category alternative name matching
Update contrib README to document --mapping-file option,
alternative name matching, and custom JSON mapping format.
* Split out KiCad API v2 into separate PR as requested by maintainer
Remove v2 controller, tests, and volatile field support from this PR.
The v2 API will be submitted as a separate PR for focused discussion.
* Improve test coverage for KiCadHelper and PopulateKicadCommand
KiCadHelper: Add tests for orderdetail eda_visibility filtering,
backward compatibility when no flags set, manufacturer/KiCost fields,
and parameter with empty name skipping.
PopulateKicadCommand: Add tests for mapping file with both footprints
and categories sections, and mapping file with only categories.
* Load populate Kicad default mappings from json file
* Moved kicad:populate documentation to central docs
* Added introduced column to PartTableColumns to make it configurable in the settings
* Use TristateCheckboxes for parameter and orderdetail types
* Fixed translation keys
* Split up default eda visibility for parameters and purchase infos
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* add option to disable keybindings
* add tests for disabling keybindings
* Fixed translation keys
* Added env to env configuration list
* Removed useless tests
The tests are already enforced by type declarations
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* added handling of LCSC barcode decoding and part loading on Label Scanner
* when a part is scanned and not found, the scanner did not redraw so scanning subsequent parts was not possible without reloading the browser page. fixed the barcode scanner initialization and shutdown so it redraws properly after part not found
* added redirection to part page on successful scan of lcsc, digikey, and mouser barcodes. added create part button if part does not exist in database
* added augmented mode to label scanner to use vendor labels for part lookup to see part storage location quickly
* shrink camera height on mobile so augmented information can been viewed onscreen
* handle momentarily bad reads from qrcode library
* removed augmented checkbox and combined functionality into info mode checkbox. changed barcode scanner to use XHR callback for barcode decoding to avoid problems with form submission and camera caused by page reloaded when part not found.
* fix scanning of part-db barcodes to redirect to storage location or part lots. made scan result messages conditional for parts or other non-part barcodes
* fix static analysis errors
* added unit tests for meeting code coverage report
* fix @MayNiklas reported bug: when manually submitting the form (from a barcode scan or manual input) redirect to Create New part screen for the decoded information instead of showing 'Format Unknown' popup error message
* fix @d-buchmann bug: clear 'scan-augmented-result' field upon rescan of new barcode
* fix @d-buchmann bug: after scanning in Info mode, if Info mode is turned off when scanning a part that did not exist, it now redirects user to create part page
* fix @d-buchmann bug: make barcode decode table 100% width of page
* fix bug with manual form submission where a part does not exist but decodes properly which causes the camera to not redraw on page reload due to unclean shutdown. this is an existing bug in the scanner interface.
steps to produce the issue:
- have camera active
- put in code in Input
- info mode ticked
- click submit button
on page reload the camera does not reactivate
* fixed translation messages
* Use symfony native functions to generate the routes for part creation
* Use native request functions for request param parsing
* Refactored LCSCBarcocdeScanResult to be an value object like the other Barcode results
* Added test for LCSCBarcodeScanResult
* Fixed exception when submitting form for info mode
* Made BarcodeSourceType a backed enum, so that it can be used in Request::getEnum()
* Moved database queries from BarcodeRedirector to PartRepository
* Fixed modeEnum parsing
* Fixed test errors
* Refactored BarcodeRedirector logic to be more universal
* Fixed BarcodeScanResultHandler test
* Refactored BarcodeScanResultHandler to be able to resolve arbitary entities from scans
* Moved barcode to info provider logic from Controller to BarcodeScanResultHandler service
* Improved augmentented info styling and allow to use it with normal form submit too
* Correctly handle nullable infoURL in ScanController
* Replaced the custom controller for fragment replacements with symfony streams
This does not require a complete new endpoint
* Removed data-lookup-url attribute from scan read box
* Removed unused translations
* Added basic info block when an storage location was found for an barcode
* Fixed phpstan issues
* Fixed tests
* Fixed part image for mobile view
* Added more tests for BarcodeScanResultHandler service
* Fixed tests
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* init API endpoint for generating labels
* Improved API docs for label endpoint
* Improved LabelGenerationProcessor
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
Fixes#1157.
- Focus `name` field on new part
- Focus `amount` on add/withdraw modal
- Focus first "number type" input on any newly added collectionType table row... (debatable)
It would be even more favorable if the user could configure if they want to use autofocus and/or for which fields/dialogs it should be enabled.
* Implement URLHandlerInfoProviderInterface in BuerklinProvider
Added URL handling capabilities to BuerklinProvider.
* Refactor ID extraction logic in BuerklinProvider
* Add tests for BuerklinProvider URLHandlerInfoProviderInterface
* Revert "Refactor ID extraction logic in BuerklinProvider"
This reverts commit 5f65176636.
* Exclude 'p' from valid ID return in BuerklinProvider
* 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)
Changes based on maintainer feedback from PR #1217:
1. Add yarn install/build steps to update process
- Added yarn availability check in validateUpdatePreconditions
- Added yarn install and yarn build steps after composer install
- Added yarn rebuild to rollback process
- Updated total steps count from 12 to 14
2. Add environment variables to disable web features
- DISABLE_WEB_UPDATES: Completely disable web-based updates
- DISABLE_BACKUP_RESTORE: Disable backup restore from web UI
- Added checks in controller and template
3. Extract BackupManager service
- New service handles backup creation, listing, details, and restoration
- UpdateExecutor now delegates backup operations to BackupManager
- Cleaner separation of concerns for future reuse
4. Merge upstream/master and resolve translation conflicts
- Added Conrad info provider and generic web provider translations
- Kept Update Manager translations
* feat: add supplier SPN lookup for BOM import
Add automatic part linking via supplier part numbers (SPNs) in the
BOM importer. When a Part-DB ID is not provided, the importer now
searches for existing parts by matching supplier SPNs from the CSV
with orderdetail records in the database.
This allows automatic part linking when KiCad schematic BOMs contain
supplier information like LCSC SPN, Mouser SPN, etc., improving the
import workflow for users who track parts by supplier part numbers.
* add tests for BOM import with supplier SPN handling
The previous implementation used inline onsubmit handlers with return
confirmVersionChange(...), which could fail silently if any JavaScript
error occurred on the page, causing the form to submit without confirmation.
Fixes:
- Use event.preventDefault() FIRST to ensure form never submits by default
- Use DOMContentLoaded event listeners instead of inline handlers
- Properly escape translation strings using json_encode filter
- Wrap in IIFE with 'use strict' for better error handling
- Use data-attributes to identify forms and pass isDowngrade state
Fix DOMContentLoaded race condition in update form handlers
The event listener was not attaching if DOMContentLoaded had already
fired by the time the script executed. Now checks document.readyState
and attaches handlers immediately if DOM is already ready.
Added console.log statements to help debug form handler attachment.
Use Stimulus controller for update confirmation dialogs
The inline script was blocked by Content Security Policy (CSP).
Stimulus controllers are bundled with webpack and properly allowed by CSP.
- Create update_confirm_controller.js Stimulus controller
- Remove inline script from template
- Pass translation strings via data-* attributes
When downgrading to versions before v2.6.0, show a warning that the
Update Manager will not be available in older versions and that future
updates will need to be done manually via command line.
- Bump permission schema to version 4
- Add upgradeSchemaToVersion4 for manage_updates permission
- Grants manage_updates to users who have both show_updates and server_infos
- Fix ZIP_RELEASE installation type: set supportsAutoUpdate to false
(ZIP update not yet implemented)
- Improve update instructions for ZIP installations
This feature adds a comprehensive Update Manager similar to Mainsail's
update system, allowing administrators to update Part-DB directly from
the web interface.
Features:
- Web UI at /admin/update-manager showing current and available versions
- Support for Git-based installations with automatic update execution
- Maintenance mode during updates to prevent user access
- Automatic database backup before updates
- Git rollback points for recovery (tags created before each update)
- Progress tracking with real-time status updates
- Update history and log viewing
- Downgrade support with appropriate UI messaging
- CLI command `php bin/console partdb:update` for server-side updates
New files:
- UpdateManagerController: Handles all web UI routes
- UpdateCommand: CLI command for running updates
- UpdateExecutor: Core update execution logic with safety mechanisms
- UpdateChecker: GitHub API integration for version checking
- InstallationTypeDetector: Detects installation type (Git/Docker/ZIP)
- MaintenanceModeSubscriber: Blocks user access during maintenance
- UpdateExtension: Twig functions for update notifications
UI improvements:
- Update notification in navbar for admins when update available
- Confirmation dialogs for update/downgrade actions
- Downgrade-specific text throughout the interface
- Progress page with auto-refresh
* Fix: Use correct field name for LCSC supplier part numbers in BOM import
The field mapping system uses 'LCSC SPN' as the target field name for LCSC
supplier part numbers (following the pattern SupplierName + ' SPN'), but the
code in parseKiCADSchematic() was incorrectly checking for 'LCSC'.
This caused LCSC supplier part numbers to be silently ignored and not included
in the BOM entry comments during schematic import.
Changed isset($mapped_entry['LCSC']) to isset($mapped_entry['LCSC SPN']) to
match the actual field name produced by the field mapping system.
* regression test: check for LCSC SPN in comment
* Support dynamic supplier SPNs in BOM import comments
Replace hardcoded LCSC SPN handling with dynamic supplier lookup to support all configured suppliers in BOM import. This allows any supplier defined in
Part-DB to have their SPN fields recognized and included in the BOM entry
comments during BOM import.
* Optimize BOM import by only calculating supplier SPN keys once
* Fixed Typos and mistranslations in GDPR mode (DSGVO Modus)
Fixed Typo enviroment
* Create BuerklinProvider based on LCSCProvider
* Update GET URLs for Buerklin
* Add getToken function analog to Octopart
* Remove line break in docs
* Remove trailing / in ENDPOINT_URL
Use Autowire to use values of environment variables
Remove unwanted Code from LCSC-Provider
Map json response to DTO variables
* Fix variable reference errors ($term → $keyword)
Ensure array keys exist before accessing them
Optimize API calls to prevent unnecessary requests
Improve error handling for better debugging
Enhance readability and maintainability of functions
* Bumped version v1.16.2
* Update BuerklinProvider.php
Change Order of Capabilities
* Change order of capabilities in LCSCProvider.php
* Change order of capabilities in PollinProvider.php
* Try to fix getToken BuerklinProvider.php
* Add ip_buerklin_oauth to knpu_oauth2_client.yaml
* Update buerklin authorize URL in knpu_oauth2_client.yaml
* Update knpu_oauth2_client.yaml
* Adapt Buerklin InfoProvider to new Settings mechanism
* According to Buerklin API spec it's really 'token' as urlAuthorize endpoint
* Rückgabewert ist schon ein Array deshalb kein toArray
* Fix API-Access, add image, price and parameter retrieval (Datasheets not yet implemented because it is not available in the API response)
* Add Caching of requests, use default query params (language and currency) using a function, Fix Footprint assignment, translate German code comments
* Remove DATASHEET from ProviderCapabilities because the Bürklin API doesn't include Datasheet URLs at the moment, more reverse engineering needed
* Update BuerklinSettings with existing translatable strings
* Improve Buerklin Settings Page
* Added Translation strings for Buerklin Info Provider
* Improve Buerklin Provider help message
* Adapt Buerklin-provider to new settings system
* Adapt Buerklin-provider to new settings system: add missing instance of BuerklinSettings
* Improve Compliance Parameters parsing
* Remove language-dependent RoHs Date code and use shortened ISO format, Add Customs Code without parseValueField
* Fix no results for keyword search
* Implement BatchInfoProviderInterface for Buerklin Provider
* Rename searchBatch to searchByKeywordsBatch to correctly implement BatchInfoProviderInterface
* Fix Bulk Info Provider Import for Buerklin
* Tranlate comments to English to prepare for Pull-Request
* Add phpUnit unit tests for BuerklinProvider
* Try fixing PHPStan issues
* Remove OAuthTokenManager from BuerklinProviderTest
Removed OAuthTokenManager mock from BuerklinProviderTest setup.
* Fix Settings must not be instantiated directly
* Fix UnitTest for value_typ
* edd5fb3319 (r2622249199)
Revert "Change order of capabilities in LCSCProvider.php"
This reverts commit dfd6f33e52.
* edd5fb3319 (r2622249861)
Revert "Change order of capabilities in PollinProvider.php"
This reverts commit fc2e7265be.
* Use language setting for ProductShortURL
* Update default language for Buerklin provider to English in documentation
* Add suggested improvements from SonarQube
* Removed unused use directives
* Revert SonarQube proposed change. Having more than one return is acceptable nowadays
* Improve getProviderInfo: disable oauth_app_name, add settings_class, improve disabled_help
* Implement retrieveROPCToken as proposed in https://github.com/Part-DB/Part-DB-server/pull/1151#discussion_r2622976206
* Add missing ) to retrieveROPCToken
* add use OAuthTokenManager and create instance in constructor
* Revert the following commits that tried to implement getToken using OAuthTokenManager
Revert "add use OAuthTokenManager and create instance in constructor"This reverts commit 2a1e7c9b0974ebd7e082d5a2fa62753d6254a767.Revert "Add missing ) to retrieveROPCToken"This reverts commit 8df5cfc49e.
Revert "Implement retrieveROPCToken as proposed in https://github.com/Part-DB/Part-DB-server/pull/1151#discussion_r2622976206"
This reverts commit 66cc732082.
* Remove OAuthTokenManager leftovers
* Disable buerklin provider if settings fields are empty
* Improved docs
* Added TODO comment
---------
Co-authored-by: root <root@part-db.fritz.box>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
Symfony/type-info returns an invalid property type for the parent property based on the @phpstan-var static phpdoc in the parent. It returns some App\Entity\Base\AttachmentType which does not exists.
Symfony issue: https://github.com/symfony/symfony/issues/62922
* Implementiere bevorzugte Sprachauswahl und Datenquellen-Synonyme
Die Spracheinstellungen/System-Settings wurden um die Möglichkeit ergänzt, bevorzugte Sprachen für die Dropdown-Menüs festzulegen. Zudem wurde ein Datenquellen-Synonymsystem implementiert, um benutzerfreundlichere Bezeichnungen anzuzeigen und zu personalisieren.
* Anpassung aus Analyse
* Entferne alten JSON-basierten Datenquellen-Synonym-Handler
Die Verwaltung der Datenquellen-Synonyme wurde überarbeitet, um ein flexibleres und strukturiertes Konzept zu ermöglichen. Der bestehende JSON-basierte Ansatz wurde durch eine neue Service-basierte Architektur ersetzt, die eine bessere Handhabung und Erweiterbarkeit erlaubt.
* Ermögliche Rückgabe aller möglichen Sprachoptionen in Verbindung mit den vom Nutzer freigeschalteten.
* Removed unnecessary service definition
The tag is applied via autoconfiguration
* Use default translations for the NotBlank constraint
* Started refactoring ElementTypeNameGenerator
* Made ElementTypeNameGenerator class readonly
* Modified form to work properly with new datastructure
* Made the form more beautiful and space saving
* Made synonym form even more space saving
* Allow to define overrides for any element label there is
* Use defined synonyms in ElementTypeNameGenerator
* Use ElementTypeNameGenerator where possible
* Register synonyms for element types as global translation parameters
* Revert changes done to permission layout
* Use new synonym system for admin page titles
* Removed now unnecessary services
* Reworked settings name and translation
* Renamed all files to Synonyms
* Removed unnecessary translations
* Removed unnecessary translations
* Fixed duplicate check
* Renamed synoynms translations
* Use our synonyms for permission translations
* Fixed phpstan issue
* Added tests
---------
Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* New translations validators.en.xlf (French)
* New translations security.en.xlf (French)
* New translations messages.en.xlf (French)
* New translations messages.en.xlf (French)
* Erweiterungstätigkeiten zur IPN-Vorschlagsliste anhand von Präfixen aus den Kategorien
* Umstellung Migrationen bzgl. Multi-Plattform-Support.
Zunächst MySQL, SQLite Statements integrieren.
* Postgre Statements integrieren
* SQL-Formatierung in Migration verbessern
* Erweitere IPN-Suggest um Bauteilbeschreibung.
Die Implementierung berücksichtigt nun zusätzlich die Bauteilbeschreibung zu maximal 150 Zeichen Länge für die Generierung von IPN-Vorschlägen und Inkrementen.
* Anpassungen aus Analyse vornehmen
* IPN-Validierung für Parts überarbeiten
* IPN-Vorschlagslogik um Konfiguration erweitert
* Anpassungen aus phpstan Analyse
* IPN-Vorschlagslogik erweitert und Bauteil-IPN vereindeutigt
Die IPN-Logik wurde um eine Konfiguration zur automatischen Suffix-Anfügung und die Berücksichtigung von doppelten Beschreibungen bei Bedarf ergänzt. Zudem wurde das Datenmodell angepasst, um eine eindeutige Speicherung der IPN zu gewährleisten.
* Regex-Konfigurationsmöglichkeit für IPN-Vorschläge einführen
Die Einstellungen für die IPN-Vorschlagslogik wurden um eine Regex-Validierung und eine Hilfetext-Konfiguration erweitert. Tests und Änderungen an den Formularoptionen wurden implementiert.
* Match range assert and form limits in suggestPartDigits
* Keep existing behavior with autoAppend suffix by default
* Show the regex hint in the browser validation notice.
* Improved translations
* Removed unnecessary service definition
* Removed german comments
---------
Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (German)
- Add BulkSearchResponseDTO, FieldMappingDTO for type safety
- Use composition instead of inheritance in BulkSearchResultDTO
- Remove unnecessary BulkSearchRequestDTO
- Fix N+1 queries and API error handling
- Fix Add Mapping button functionality
* New translations messages.en.xlf (German)
* New translations validators.en.xlf (German)
* New translations messages.en.xlf (German)
* New translations security.en.xlf (German)
* New translations validators.en.xlf (Dutch)
* New translations messages.en.xlf (German)
* New translations messages.en.xlf (German)
* New translations security.en.xlf (German)
* New translations messages.en.xlf (German)
When the part count notice is always displayed, the exclamation mark would probably be perceived as rather annoying.
(Of course this would have to be reflected in crowdin)
* New translations messages.en.xlf (Czech)
* New translations messages.en.xlf (Czech)
* New translations messages.en.xlf (Czech)
* New translations messages.en.xlf (Czech)
* New translations messages.en.xlf (German)
* New translations messages.en.xlf (German)
* New translations messages.en.xlf (German)
This way it gets all environment variables and we do not need to hassle ourselves with the generation of php-fpm config files and we can use the normal clear_env=no option
This fixes issue #1006
* Add supplier information to KiCad part exports
- Include supplier name and part numbers from order details in KiCad exports
- Handle multiple suppliers with sequential numbering (Supplier 2, Supplier 3, etc.)
- Include both active and obsolete order details for comprehensive supplier info
- Add null checks to prevent errors when supplier or part number is missing
* Add SPN suffix to field name
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* Update AbstractParameter.php
Make lazy null conditionals explicit.
Try to handle LaTeX special chars gracefully.
Fixes#958
* Only escape the percentage sign, so that you can still use latex for units
* Only escape previously unescaped percentage signs
* simplify regex
* Render the percentage sign correctly in units in the frontend.
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* Add env option to disable part image overlay
Fixes#369 while preserving the state as-is
* Added documentation and use 1 instead of true for new env
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* fix sidebar root node links
link sidebar root nodes to their corresponding "new" route
* Use "Show all parts" for most root categories and started to make it configurable for the future
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* Modified the DigiKey Provider to works with the V4 API
* Correclty apply the MarketPlaceFilter option to digikey v4 API
* Show the packe type (Tape&Reel, Box, etc.) as footprint in digikey provider search
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
Added more headers to make it appear more like a browser request, and try to use TLS1.3, if we get a 403 (which is useful for digikey).
Commit cherry picked from @Treeed
* fixed attachment statistics for sqlite
* Split attachment path into internal and external path, so the external source URL can be retained after a file is downloaded
* Make internal and external path for attachments nullable, to make clear that they have no internal or external path
* Added migrations for nullable columns for postgres and mysql
* Added migration for nullable internal and external pathes for sqlite
* Added translations
* Fixed upload error
* Restrict length of filename badge in attachment edit view
* Improved margins with badges in attachment edit
* Added a link to view external version from attachment edit
* Let media_url stay in API attachments responses for backward compatibility
---------
Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* made autocomplete controller allow selecting text and autocommit typed text on blur
* moved click_to_edit and autoselect_typed into separate plugins
---------
Co-authored-by: jona <a@b.c>
* New translations security.en.xlf (Russian)
* New translations validators.en.xlf (Russian)
* New translations messages.en.xlf (Russian)
* New translations messages.en.xlf (English)
* New translations messages.en.xlf (Italian)
* added capability to scan digikey barcodes and open the local part page based on the digikey part number or manufacturer part number
* had replaced one too many doublequotes
* Generalized interpretation of format06 barcodes, added ids for mouser
* Renamed vendor_barcode to user_barcode in entities
* Added a own class to parse EIGP114 barcodes
* Added tests to EIGP114Barcode parser
* Refactored code
* Changed BarcodeRedirector to support the new Barcode EIGP114BarcodeScanResult class
* Added possibility to just show all information contained in a barcode
* Dont require trailer for EIGP114 barcodes, as digikey does not seem to put them onto their barcodes
* Fixed inspection issues
---------
Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
* added button to show existing part with same manufacturer and mpn in provider list
* added button to edit existing part in provider list
* added docstring and comments
* replaced unnecessary double quotes
* Introduced a new twig variable localPart to split up the result
* Highlight a row, if the part is already existing
* Made buttons translatable
* Improved styling of the buttons and added a badge to show a hint
* Extracted database queries for part matching into its own service and optimized the query reducing the required queries by factor 2
* Allow to find existing parts via the stored providerReference
This should allow the database to more quickly find entries
* Allow to use part name and manufacturer alternative names for mapping
* Added a button to update a local part from the info provider and moved some buttons into dropdown menu
---------
Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
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
This fixes issue #701. For the search field this was caused by algolia/autocomplete lib, which do not support multiple autocomplete fields on a single page. If initailly loaded on the homepage, which features a second autocomplete, this one "steals" the input listening, and the one in the navbar do not close anymore when clicking outside.
Custom code which triggers the closing of the autocomplete manually when clicking outside, was added as a workaround.
* New translations messages.en.xlf (English)
* New translations validators.en.xlf (German)
* New translations messages.en.xlf (German)
* New translations messages.en.xlf (Italian)
* 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>
* New translations messages.en.xlf (English)
* New translations validators.en.xlf (English)
* New translations security.en.xlf (English)
* New translations validators.en.xlf (Italian)
* reorder nodejs/yarn install, separate packages per line
* reduce run actions and reorganize commands
* simplify file creation, copy in one layer only
* fix lint LegacyKeyValueFormat
* arg php_version to run different version
* reorder copy from generated config
* update dockerfile-frankenphp
We now look directly onto the driver arguments instead of retrieving a database platform, for which we would need the database version.
As we modify driver specific options there, this might be the better choice anyway
# The language to use serverwide as default (en, de, ru, etc.)
DEFAULT_LANG="en"
# The default timezone to use serverwide (e.g. Europe/Berlin)
DEFAULT_TIMEZONE="Europe/Berlin"
# The currency that is used inside the DB (and is assumed when no currency is set). This can not be changed later, so be sure to set it the currency used in your country
BASE_CURRENCY="EUR"
# The name of this installation. This will be shown as title in the browser and in the header of the website
INSTANCE_NAME="Part-DB"
# Allow users to download attachments to the server by providing an URL
# This could be a potential security issue, as the user can retrieve any file the server has access to (via internet)
ALLOW_ATTACHMENT_DOWNLOADS=0
# Set this to 1, if the "download external files" checkbox should be checked by default for new attachments
ATTACHMENT_DOWNLOAD_BY_DEFAULT=0
# Use gravatars for user avatars, when user has no own avatar defined
USE_GRAVATAR=0
# The maximum allowed size for attachment files in bytes (you can use M for megabytes and G for gigabytes)
# Please note that the php.ini setting upload_max_filesize also limits the maximum size of uploaded files
MAX_ATTACHMENT_FILE_SIZE="100M"
# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates
# This must end with a slash!
# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates or when no request context is available.
DEFAULT_URI="https://partdb.changeme.invalid/"
# With this option you can configure, where users are enforced to give a change reason, which will be logged
# This is a comma separated list of values, see documentation for available values
# Leave this empty, to make all change reasons optional
ENFORCE_CHANGE_COMMENTS_FOR=""
# Disable that if you do not want that Part-DB connects to GitHub to check for available updates, or if your server can not connect to the internet
# You can get your client id and secret from https://developer.digikey.com/
PROVIDER_DIGIKEY_CLIENT_ID=
PROVIDER_DIGIKEY_SECRET=
# The currency to get prices in
PROVIDER_DIGIKEY_CURRENCY=EUR
# The language to get results in (en, de, fr, it, es, zh, ja, ko)
PROVIDER_DIGIKEY_LANGUAGE=en
# The country to get results for
PROVIDER_DIGIKEY_COUNTRY=DE
# Farnell Provider:
# You can get your API key from https://partner.element14.com/
PROVIDER_ELEMENT14_KEY=
# Configure the store domain you want to use. This decides the language and currency of results. You can get a list of available stores from https://partner.element14.com/docs/Product_Search_API_REST__Description
PROVIDER_ELEMENT14_STORE_ID=de.farnell.com
# TME Provider:
# You can get your API key from https://developers.tme.eu/en/
PROVIDER_TME_KEY=
PROVIDER_TME_SECRET=
# The currency to get prices in
PROVIDER_TME_CURRENCY=EUR
# The language to get results in (en, de, pl)
PROVIDER_TME_LANGUAGE=en
# The country to get results for
PROVIDER_TME_COUNTRY=DE
# Set this to 1 to get gross prices (including VAT) instead of net prices
PROVIDER_TME_GET_GROSS_PRICES=1
# Octopart / Nexar Provider:
# You can get your API key from https://nexar.com/api
PROVIDER_OCTOPART_CLIENT_ID=
PROVIDER_OCTOPART_SECRET=
# The currency and country to get prices for (you have to set both to get meaningful results)
# 3 letter ISO currency code (e.g. EUR, USD, GBP)
PROVIDER_OCTOPART_CURRENCY=EUR
# 2 letter ISO country code (e.g. DE, US, GB)
PROVIDER_OCTOPART_COUNTRY=DE
# The number of results to get from Octopart while searching (please note that this counts towards your API limits)
PROVIDER_OCTOPART_SEARCH_LIMIT=10
# Set to false to include non authorized offers in the results
PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS=1
# Mouser Provider API V2:
# You can get your API key from https://www.mouser.it/api-hub/
PROVIDER_MOUSER_KEY=
# Filter search results by RoHS compliance and stock availability:
# Available options: None | Rohs | InStock | RohsAndInStock
PROVIDER_MOUSER_SEARCH_OPTION='None'
# The number of results to get from Mouser while searching (please note that this value is max 50)
PROVIDER_MOUSER_SEARCH_LIMIT=50
# It is recommended to leave this set to 'true'. The option is not really good doumented by Mouser:
# Used when searching for keywords in the language specified when you signed up for Search API.
*`public`: Everything in this directory will be publicy accessible via web. Use this folder to serve static images.
*`assets`: The frontend assets are saved here. You can find the javascript and CSS code here.
*`src`: Part-DB's PHP code is saved here. Note that the subdirectories are structured by the classes purposes (so use `Controller` Controllers, `Entities` for Database models, etc.)
*`translations`: The translations used in Part-DB are saved here
*`public`: Everything in this directory will be publicly accessible via web. Use this folder to serve static images.
*`assets`: The frontend assets are saved here. You can find the JavaScript and CSS code here.
*`src`: Part-DB's PHP code is saved here. Note that the subdirectories are structured by the classes' purposes (so use `Controller` for Controllers, `Entity` for Database models, etc.)
*`translations`: The translations used in Part-DB are saved here.
*`templates`: The templates (HTML) that are used by Twig to render the different pages. Email templates are also saved here.
*`tests/`: Tests that can be run by PHPunit.
*`tests/`: Tests that can be run by PHPUnit.
## Development environment
For setting up an development you will need to install PHP, composer, a database server (MySQL or MariaDB) and yarn (which needs an nodejs environment).
* Copy `.env` to `.env.local` and change `APP_ENV` to `APP_ENV=dev`. That way you will get development tools (symfony profiler) and other features that
For setting up a development environment, you will need to install PHP, Composer, a database server (MySQL or MariaDB) and yarn (which needs a Node.js environment).
* Copy `.env` to `.env.local` and change `APP_ENV` to `APP_ENV=dev`. That way you will get development tools (Symfony profiler) and other features that
will simplify development.
* Run `composer install` (without -o) to install PHP dependencies and `yarn install` to install frontend dependencies
* Run `yarn watch`. The program will run in the background and compile the frontend files whenever you change something in the CSS or TypeScript files
* For running Part-DB it is recommended to use [Symfony CLI](https://symfony.com/download).
That way you can run a correct configured webserver with `symfony serve`
* Run `composer install` (without -o) to install PHP dependencies and `yarn install` to install frontend dependencies.
* Run `yarn watch`. The program will run in the background and compile the frontend files whenever you change something in the CSS or TypeScript files.
* For running Part-DB, it is recommended to use [Symfony CLI](https://symfony.com/download).
That way you can run a correctly configured webserver with `symfony serve`.
## Coding style
Code should follow the [PSR12-Standard](https://www.php-fig.org/psr/psr-12/) and symfony's [coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
Code should follow the [PSR-12Standard](https://www.php-fig.org/psr/psr-12/) and Symfony's [coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
Part-DB uses [Easy Coding Standard](https://github.com/symplify/easy-coding-standard) to check and fix coding style violations:
* To check your code for valid code style run `vendor/bin/ecs check src/`
* To fix violations run `vendor/bin/ecs check src/` (please checks afterwards if the code is valid afterwards)
* To check your code for valid code style, run `vendor/bin/ecs check src/`
* To fix violations, run `vendor/bin/ecs check src/ --fix` (please check afterwards if the code is still valid)
## GitHub actions
Part-DB uses GitHub actions to run various tests and checks on the code:
Part-DB uses GitHub Actions to run various tests and checks on the code:
* Yarn dependencies can compile
* PHPunit tests run successful
* Config files, translations and templates has valid syntax
* Doctrine schema valid
* No known vulnerable dependecies are used
* Static analysis successful (phpstan with `--level=2`)
* PHPUnit tests run successfully
* Config files, translations, and templates have valid syntax
* Doctrine schema is valid
* No known vulnerable dependencies are used
* Static analysis is successful (phpstan with `--level=2`)
Further the code coverage of the PHPunit tests is determined and uploaded to [CodeCov](https://codecov.io/gh/Part-DB/Part-DB-server).
Further, the code coverage of the PHPUnit tests is determined and uploaded to [CodeCov](https://codecov.io/gh/Part-DB/Part-DB-server).
"_comment":"Default KiCad footprint/symbol mappings for partdb:kicad:populate command. Based on KiCad 9.x standard libraries. Use --mapping-file to override or extend these mappings.",
@@ -108,11 +108,19 @@ export default class extends Controller {
constraw_order=saved_state.order;
settings.initial_order=raw_order.map((order)=>{
//Skip if direction is empty, as this is the default, otherwise datatables server is confused when the order is sent in the request, but the initial order is set to an empty direction
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2026 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import{Controller}from"@hotwired/stimulus";
/**
* Purpose of this controller is to allow users to input non-printable characters like EOT, FS, etc. in a form field and submit them correctly with the form.
* The visible input field encodes non-printable characters via their Unicode Control picture representation, e.g. \n becomes ␊ and \t becomes ␉, so that they can be displayed in the input field without breaking the form submission.
* The actual value of the field, which is submitted with the form, is stored in a hidden input and contains the non-printable characters in their original form.
* Ensures that non-printable characters like EOT, FS, etc. gets added to the input value when the user types them
* @param event
* @private
*/
_onKeyPress(event){
constALLOWED_INPUT_CODES=[4,28,29,30,31];//EOT, FS, GS, RS, US
if(!ALLOWED_INPUT_CODES.includes(event.keyCode)){
return;
}
event.preventDefault();
constchar=String.fromCharCode(event.keyCode);
this.element.value+=char;
this._update();
}
_update(){
//Chrome workaround: Remove a leading ∠ character (U+2220) that appears when the user types a non-printable character at the beginning of the input field.
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret:'%env(APP_SECRET)%'
csrf_protection:true
annotations:false
handle_all_throwables:true
# We set this header by ourselves, so we can disable it here
disallow_search_engine_index:false
@@ -11,6 +9,7 @@ framework:
# Must be set to true, to enable the change of HTTP method via _method parameter, otherwise our delete routines does not work anymore
# TODO: Rework delete routines to work without _method parameter as it is not recommended anymore (see https://github.com/symfony/symfony/issues/45278)
http_method_override:true
allowed_http_method_override:['DELETE']
# Allow users to configure trusted hosts via .env variables
# see https://symfony.com/doc/current/reference/configuration/framework.html#trusted-hosts
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.