diff --git a/composer.json b/composer.json index cc0b39f45d..e06d0b4cff 100644 --- a/composer.json +++ b/composer.json @@ -24,14 +24,14 @@ "php": " >=8.3", "ext-json": "*", "babdev/pagerfanta-bundle": "^4.5", - "ibexa/content-forms": "~5.0.x-dev", - "ibexa/core": "~5.0.x-dev", - "ibexa/design-engine": "~5.0.x-dev", + "ibexa/content-forms": "~5.0", + "ibexa/core": "~5.0", + "ibexa/design-engine": "~5.0", "ibexa/polyfill-php82": "^1.0", - "ibexa/rest": "~5.0.x-dev", - "ibexa/search": "~5.0.x-dev", - "ibexa/twig-components": "~5.0.x-dev", - "ibexa/user": "~5.0.x-dev", + "ibexa/rest": "~5.0", + "ibexa/search": "~5.0", + "ibexa/twig-components": "~5.0", + "ibexa/user": "~5.0", "jms/translation-bundle": "^2.4", "knplabs/knp-menu-bundle": "^3.0", "mck89/peast": "^1.9", @@ -61,15 +61,15 @@ "require-dev": { "ext-zip": "*", "dama/doctrine-test-bundle": "^8.2", - "ibexa/behat": "~5.0.x-dev", + "ibexa/behat": "~5.0", "ibexa/code-style": "~2.0.0", - "ibexa/doctrine-schema": "~5.0.x-dev", - "ibexa/http-cache": "~5.0.x-dev", - "ibexa/notifications": "~5.0.x-dev", - "ibexa/phpstan": "~5.0.x-dev", - "ibexa/rector": "~5.0.x-dev", - "ibexa/test-core": "~5.0.x-dev", - "ibexa/test-rest": "~5.0.x-dev", + "ibexa/doctrine-schema": "~5.0", + "ibexa/http-cache": "~5.0", + "ibexa/notifications": "~5.0", + "ibexa/phpstan": "~5.0", + "ibexa/rector": "~5.0", + "ibexa/test-core": "~5.0", + "ibexa/test-rest": "~5.0", "matthiasnoback/symfony-dependency-injection-test": "^5.0", "phpstan/phpstan": "^2.0", "phpstan/phpstan-phpunit": "^2.0", @@ -98,4 +98,4 @@ "dev-main": "5.0.x-dev" } } -} +} \ No newline at end of file diff --git a/src/bundle/Resources/public/js/scripts/admin.content.edit.js b/src/bundle/Resources/public/js/scripts/admin.content.edit.js index 5f0e515e9b..aa56b3f1c2 100644 --- a/src/bundle/Resources/public/js/scripts/admin.content.edit.js +++ b/src/bundle/Resources/public/js/scripts/admin.content.edit.js @@ -32,7 +32,7 @@ const fields = doc.querySelectorAll('.ibexa-field-edit'); const getValidationResults = (validator) => { const isValid = validator.isValid(); - const validatorName = validator.constructor.name; + const validatorName = validator.getValidatorName(); const result = { isValid, validatorName }; return result; diff --git a/src/bundle/Resources/public/js/scripts/fieldType/base/base-field.js b/src/bundle/Resources/public/js/scripts/fieldType/base/base-field.js index 6dc6eb8480..6df2157044 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/base/base-field.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/base/base-field.js @@ -13,6 +13,10 @@ return this.fieldContainer ? this.fieldContainer : fallback; } + getValidatorName() { + return 'BaseFieldValidator'; + } + /** * Attaches event to elements found with a selector provided by field config * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/base/multi-input-field.js b/src/bundle/Resources/public/js/scripts/fieldType/base/multi-input-field.js index 7b0054a74b..50d6026b2d 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/base/multi-input-field.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/base/multi-input-field.js @@ -6,6 +6,10 @@ this.containerSelectors = containerSelectors; } + getValidatorName() { + return 'MultiInputFieldValidator'; + } + toggleInvalidState(isError, config, input) { super.toggleInvalidState(isError, config, input); diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_boolean.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_boolean.js index 7e0dd0f07c..6681e4f7cc 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_boolean.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_boolean.js @@ -3,6 +3,10 @@ const SELECTOR_ERROR_NODE = '.ibexa-form-error'; class IbexaBooleanValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaBooleanValidator'; + } + /** * Validates the input field value * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_country.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_country.js index a3a6d2e10c..af18457c4b 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_country.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_country.js @@ -5,6 +5,10 @@ const SELECTOR_ERROR_NODE = '.ibexa-form-error'; class IbexaCountryValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaCountryValidator'; + } + /** * Validates the country field value * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_date.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_date.js index 2999ed43a8..f9dafbb676 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_date.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_date.js @@ -6,6 +6,10 @@ const SELECTOR_ERROR_NODE = '.ibexa-form-error'; class IbexaDateValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaDateValidator'; + } + /** * Validates the input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_datetime.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_datetime.js index b39c90534c..df80bc5400 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_datetime.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_datetime.js @@ -7,6 +7,10 @@ const { convertDateToTimezone } = ibexa.helpers.timezone; class IbexaDateTimeValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaDateTimeValidator'; + } + /** * Validates the input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_email.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_email.js index 9fb8ab48ec..215f27a243 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_email.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_email.js @@ -3,6 +3,10 @@ const SELECTOR_ERROR_NODE = '.ibexa-form-error'; class IbexaEmailValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaEmailValidator'; + } + /** * Validates the input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_float.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_float.js index db9c64e220..aa9359489f 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_float.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_float.js @@ -3,6 +3,10 @@ const SELECTOR_ERROR_NODE = `${SELECTOR_FIELD} .ibexa-form-error`; class IbexaFloatValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaFloatValidator'; + } + /** * Validates the input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_gmap_location.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_gmap_location.js index fc801058c3..b3dfa809b2 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_gmap_location.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_gmap_location.js @@ -20,6 +20,10 @@ const maps = []; class IbexaGMapLocationValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaGMapLocationValidator'; + } + /** * Validates latitude/longitude input value * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_integer.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_integer.js index 966c9ed2e6..16a6b0c775 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_integer.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_integer.js @@ -3,6 +3,10 @@ const SELECTOR_ERROR_NODE = `${SELECTOR_FIELD} .ibexa-form-error`; class IbexaIntegerValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaIntegerValidator'; + } + /** * Validates the input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_keyword.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_keyword.js index 6100ee5d2b..b4a8ad4c56 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_keyword.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_keyword.js @@ -5,6 +5,10 @@ const SELECTOR_ERROR_NODE = '.ibexa-form-error'; class IbexaKeywordValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaKeywordValidator'; + } + /** * Validates the keywords input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_object_relation_list.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_object_relation_list.js index 733f46cf86..8ddb2b48c8 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_object_relation_list.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_object_relation_list.js @@ -11,6 +11,10 @@ const EVENT_CUSTOM = 'validateInput'; class IbexaObjectRelationListValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaObjectRelationListValidator'; + } + /** * Validates the input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_selection.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_selection.js index cc0efa6247..2359ed0204 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_selection.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_selection.js @@ -5,6 +5,10 @@ const EVENT_VALUE_CHANGED = 'change'; class IbexaSelectionValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaSelectionValidator'; + } + /** * Validates the textarea field value * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_string.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_string.js index 7b360afa29..54c18b618b 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_string.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_string.js @@ -3,6 +3,10 @@ const SELECTOR_SOURCE_INPUT = '.ibexa-data-source__input'; class IbexaStringValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaStringValidator'; + } + /** * Validates the input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_text.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_text.js index 7faaa3b474..d053f3c828 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_text.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_text.js @@ -2,6 +2,10 @@ const SELECTOR_FIELD = '.ibexa-field-edit--ibexa_text'; class IbexaTextValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaTextValidator'; + } + /** * Validates the textarea field value * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_time.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_time.js index ab4e9b3dc3..a7cfe5c1eb 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_time.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_time.js @@ -6,6 +6,10 @@ const EVENT_VALUE_CHANGED = 'change'; class IbexaTimeValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaTimeValidator'; + } + /** * Validates the input * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_url.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_url.js index 70dbd5fc3d..9ff08ee4b8 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_url.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_url.js @@ -6,6 +6,10 @@ const SELECTOR_ERROR_NODE = '.ibexa-data-source__field--link .ibexa-form-error'; class IbexaUrlValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaUrlValidator'; + } + validateUrl(event) { const result = { isError: false, diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_user.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_user.js index 5dfe07b010..f11622b7db 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_user.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_user.js @@ -10,6 +10,10 @@ const SELECTOR_ERROR_WRAPPER = '.ibexa-form-error'; class IbexaUserValidator extends ibexa.BaseFieldValidator { + getValidatorName() { + return 'IbexaUserValidator'; + } + /** * Validates the input field value * diff --git a/src/bundle/Resources/public/js/scripts/fieldType/validator/richtext-validator.js b/src/bundle/Resources/public/js/scripts/fieldType/validator/richtext-validator.js index d22c74517e..4348d3120c 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/validator/richtext-validator.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/validator/richtext-validator.js @@ -11,6 +11,10 @@ class RichTextValidator extends ibexa.BaseFieldValidator { this.labelSelector = labelSelector; } + getValidatorName() { + return 'RichTextValidator'; + } + /** * Validates the input *