diff --git a/composer.json b/composer.json index b78d4b6..80c71a3 100644 --- a/composer.json +++ b/composer.json @@ -4,13 +4,14 @@ "type": "library", "license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"], "require": { - "php": ">=7.1", - "nette/forms": "^3.0", + "php": ">=8.3", + "adt/nette-forms-components": "^2.3", "nette/di": "^3.0", "nette/utils": "^3.0 | ^4.0", "nette/application": "*", - "adt/doctrine-components": "^2.9|^3.0" - }, + "adt/doctrine-components": "^3.0", + "nette/forms": "^3.2.9" + }, "autoload": { "psr-4": { "ADT\\": "src/" diff --git a/src/Components/AjaxSelect/Entities/AbstractEntity.php b/src/Components/AjaxSelect/Entities/AbstractEntity.php index 1bad32e..2bd32cd 100644 --- a/src/Components/AjaxSelect/Entities/AbstractEntity.php +++ b/src/Components/AjaxSelect/Entities/AbstractEntity.php @@ -3,7 +3,7 @@ namespace ADT\Components\AjaxSelect\Entities; use ADT\Components\AjaxSelect; -use ADT\DoctrineComponents\QueryObject; +use ADT\DoctrineComponents\QueryObject\QueryObject; use Nette\Application\UI\Presenter; use Nette\SmartObject; @@ -201,7 +201,7 @@ public function done() { is_array($controlValue) ? $controlValue : [ $controlValue ], - $control->getForm()->getValues('array') + $control->getForm()->getValidatedValues('array') ) : [], 'queryParam' => static::OPTION_QUERY, diff --git a/src/Components/AjaxSelect/Traits/AjaxServiceControlTrait.php b/src/Components/AjaxSelect/Traits/AjaxServiceControlTrait.php index f323d38..4e7f639 100644 --- a/src/Components/AjaxSelect/Traits/AjaxServiceControlTrait.php +++ b/src/Components/AjaxSelect/Traits/AjaxServiceControlTrait.php @@ -53,7 +53,7 @@ protected function processValues($values) { $validValues = array_merge($validValues, $invalidValues); } - $validItems = $this->getAjaxEntity()->formatValues($this->getAjaxEntity()->hydrateValues($validValues, $this->getForm()->getValues('array'))); + $validItems = $this->getAjaxEntity()->formatValues($this->getAjaxEntity()->hydrateValues($validValues, $this->getForm()->getValidatedValues('array'))); // add to list of valid values $this->setItems($this->getItems() + $validItems); diff --git a/src/Components/AjaxSelect/Traits/InvalidSetValueTrait.php b/src/Components/AjaxSelect/Traits/InvalidSetValueTrait.php index e2f5afe..6f75a61 100644 --- a/src/Components/AjaxSelect/Traits/InvalidSetValueTrait.php +++ b/src/Components/AjaxSelect/Traits/InvalidSetValueTrait.php @@ -35,7 +35,7 @@ public function setInvalidValueMode($mode) { return $this; } - protected abstract function getHttpData($type, ?string $htmlTail = NULL); + protected abstract function getHttpData(int $type, ?string $htmlTail = NULL): mixed; protected abstract function isDisabled(); /**