diff --git a/.docker/partdb-entrypoint.sh b/.docker/partdb-entrypoint.sh index ffd2b24a..5bfc6b48 100644 --- a/.docker/partdb-entrypoint.sh +++ b/.docker/partdb-entrypoint.sh @@ -42,48 +42,6 @@ fi # Start PHP-FPM (the PHP_VERSION is replaced by the configured version in the Dockerfile) service phpPHP_VERSION-fpm start - -# Run migrations if automigration is enabled via env variable DB_AUTOMIGRATE -if [ "$DB_AUTOMIGRATE" = "true" ]; then - echo "Waiting for database to be ready..." - ATTEMPTS_LEFT_TO_REACH_DATABASE=60 - until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(sudo -E -u www-data php bin/console dbal:run-sql -q "SELECT 1" 2>&1); do - if [ $? -eq 255 ]; then - # If the Doctrine command exits with 255, an unrecoverable error occurred - ATTEMPTS_LEFT_TO_REACH_DATABASE=0 - break - fi - sleep 1 - ATTEMPTS_LEFT_TO_REACH_DATABASE=$((ATTEMPTS_LEFT_TO_REACH_DATABASE - 1)) - echo "Still waiting for database to be ready... Or maybe the database is not reachable. $ATTEMPTS_LEFT_TO_REACH_DATABASE attempts left." - done - - if [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ]; then - echo "The database is not up or not reachable:" - echo "$DATABASE_ERROR" - exit 1 - else - echo "The database is now ready and reachable" - fi - - # Check if there are any available migrations to do, by executing doctrine:migrations:up-to-date - # and checking if the exit code is 0 (up to date) or 1 (not up to date) - if sudo -E -u www-data php bin/console doctrine:migrations:up-to-date --no-interaction; then - echo "Database is up to date, no migrations necessary." - else - echo "Migrations available..." - echo "Do backup of database..." - - sudo -E -u www-data mkdir -p /var/www/html/uploads/.automigration-backup/ - # Backup the database - sudo -E -u www-data php bin/console partdb:backup -n --database /var/www/html/uploads/.automigration-backup/backup-$(date +%Y-%m-%d_%H-%M-%S).zip - - # Check if there are any migration files - sudo -E -u www-data php bin/console doctrine:migrations:migrate --no-interaction - fi - -fi - # first arg is `-f` or `--some-option` (taken from https://github.com/docker-library/php/blob/master/8.2/bullseye/apache/docker-php-entrypoint) if [ "${1#-}" != "$1" ]; then set -- apache2-foreground "$@" diff --git a/.docker/symfony.conf b/.docker/symfony.conf index b5229bf6..5788a630 100644 --- a/.docker/symfony.conf +++ b/.docker/symfony.conf @@ -44,8 +44,6 @@ PassEnv PROVIDER_MOUSER_KEY PROVIDER_MOUSER_SEARCH_OPTION PROVIDER_MOUSER_SEARCH_LIMIT PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE PassEnv PROVIDER_LCSC_ENABLED PROVIDER_LCSC_CURRENCY PassEnv PROVIDER_OEMSECRETS_KEY PROVIDER_OEMSECRETS_COUNTRY_CODE PROVIDER_OEMSECRETS_CURRENCY PROVIDER_OEMSECRETS_ZERO_PRICE PROVIDER_OEMSECRETS_SET_PARAM PROVIDER_OEMSECRETS_SORT_CRITERIA - PassEnv PROVIDER_REICHELT_ENABLED PROVIDER_REICHELT_CURRENCY PROVIDER_REICHELT_COUNTRY PROVIDER_REICHELT_LANGUAGE PROVIDER_REICHELT_INCLUDE_VAT - PassEnv PROVIDER_POLLIN_ENABLED PassEnv EDA_KICAD_CATEGORY_DEPTH # For most configuration files from conf-available/, which are diff --git a/.env b/.env index 1806e9c6..ce2a6b03 100644 --- a/.env +++ b/.env @@ -143,8 +143,7 @@ PROVIDER_TME_CURRENCY=EUR PROVIDER_TME_LANGUAGE=en # The country to get results for PROVIDER_TME_COUNTRY=DE -# [DEPRECATED] Set this to 1 to get gross prices (including VAT) instead of net prices -# With private API keys, this option cannot be used anymore is ignored by Part-DB. The VAT inclusion depends on your TME account settings. +# Set this to 1 to get gross prices (including VAT) instead of net prices PROVIDER_TME_GET_GROSS_PRICES=1 # Octopart / Nexar Provider: @@ -216,27 +215,6 @@ PROVIDER_OEMSECRETS_SET_PARAM=1 #If unset or set to any other value, no sorting is performed. PROVIDER_OEMSECRETS_SORT_CRITERIA=C - -# Reichelt provider: -# Reichelt.com offers no official API, so this info provider webscrapes the website to extract info -# It could break at any time, use it at your own risk -# We dont require an API key for Reichelt, just set this to 1 to enable Reichelt support -PROVIDER_REICHELT_ENABLED=0 -# The country to get prices for -PROVIDER_REICHELT_COUNTRY=DE -# The language to get results in (en, de, fr, nl, pl, it, es) -PROVIDER_REICHELT_LANGUAGE=en -# Include VAT in prices (set to 1 to include VAT, 0 to exclude VAT) -PROVIDER_REICHELT_INCLUDE_VAT=1 -# The currency to get prices in (only for countries with countries other than EUR) -PROVIDER_REICHELT_CURRENCY=EUR - -# Pollin provider: -# Pollin.de offers no official API, so this info provider webscrapes the website to extract info -# It could break at any time, use it at your own risk -# We dont require an API key for Pollin, just set this to 1 to enable Pollin support -PROVIDER_POLLIN_ENABLED=0 - ################################################################################## # EDA integration related settings ################################################################################## diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8e6ea54c..62bdc123 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: [ '8.1', '8.2', '8.3', '8.4' ] + php-versions: [ '8.1', '8.2', '8.3' ] db-type: [ 'mysql', 'sqlite', 'postgres' ] env: @@ -126,7 +126,7 @@ jobs: run: ./bin/phpunit --coverage-clover=coverage.xml - name: Upload coverage - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v4 with: env_vars: PHP_VERSION,DB_TYPE token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 0f909f16..15049166 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ARG BASE_IMAGE=debian:bookworm-slim -ARG PHP_VERSION=8.3 +ARG PHP_VERSION=8.2 FROM ${BASE_IMAGE} AS base ARG PHP_VERSION @@ -125,7 +125,6 @@ upload_max_filesize=256M post_max_size=300M opcache.preload_user=www-data opcache.preload=/var/www/html/config/preload.php -log_limit=8096 EOF COPY ./.docker/symfony.conf /etc/apache2/sites-available/symfony.conf diff --git a/VERSION b/VERSION index 511a76e6..4ea8ad87 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.1 +1.14.3 diff --git a/assets/ckeditor/plugins/PartDBLabel/PartDBLabelUI.js b/assets/ckeditor/plugins/PartDBLabel/PartDBLabelUI.js index 37e1dcbe..aa29e889 100644 --- a/assets/ckeditor/plugins/PartDBLabel/PartDBLabelUI.js +++ b/assets/ckeditor/plugins/PartDBLabel/PartDBLabelUI.js @@ -128,8 +128,6 @@ const PLACEHOLDERS = [ ['[[BARCODE_QR]]', 'QR code linking to this element'], ['[[BARCODE_C128]]', 'Code 128 barcode linking to this element'], ['[[BARCODE_C39]]', 'Code 39 barcode linking to this element'], - ['[[BARCODE_C93]]', 'Code 93 barcode linking to this element'], - ['[[BARCODE_DATAMATRIX]]', 'Datamatrix code linking to this element'], ] }, { diff --git a/assets/ckeditor/plugins/PartDBLabel/lang/de.js b/assets/ckeditor/plugins/PartDBLabel/lang/de.js index 748b1607..2220cc0b 100644 --- a/assets/ckeditor/plugins/PartDBLabel/lang/de.js +++ b/assets/ckeditor/plugins/PartDBLabel/lang/de.js @@ -69,8 +69,6 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, { 'QR code linking to this element': 'QR Code verknüpft mit diesem Element', 'Code 128 barcode linking to this element': 'Code 128 Barcode verknüpft mit diesem Element', 'Code 39 barcode linking to this element': 'Code 39 Barcode verknüpft mit diesem Element', - 'Code 93 barcode linking to this element': 'Code 93 Barcode verknüpft mit diesem Element', - 'Datamatrix code linking to this element': 'Datamatrix Code verknüpft mit diesem Element', 'Location ID': 'Lagerort ID', 'Name': 'Name', diff --git a/assets/controllers/elements/attachment_autocomplete_controller.js b/assets/controllers/elements/attachment_autocomplete_controller.js index f8bc301e..fe44baee 100644 --- a/assets/controllers/elements/attachment_autocomplete_controller.js +++ b/assets/controllers/elements/attachment_autocomplete_controller.js @@ -23,12 +23,6 @@ import "tom-select/dist/css/tom-select.bootstrap5.css"; import '../../css/components/tom-select_extensions.css'; import TomSelect from "tom-select"; -import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit' -import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed' - -TomSelect.define('click_to_edit', TomSelect_click_to_edit) -TomSelect.define('autoselect_typed', TomSelect_autoselect_typed) - export default class extends Controller { _tomSelect; @@ -52,12 +46,6 @@ export default class extends Controller { } return '