From b69420eb7611eead7da49d2d2ab95a1deacd72b3 Mon Sep 17 00:00:00 2001 From: fritzmg Date: Wed, 29 Nov 2023 10:03:28 +0000 Subject: [PATCH] remove version check altogether --- src/Form/Form.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Form/Form.php b/src/Form/Form.php index f055ede..a49784e 100644 --- a/src/Form/Form.php +++ b/src/Form/Form.php @@ -9,7 +9,6 @@ use Codefog\HasteBundle\Form\Validator\ValidatorInterface; use Codefog\HasteBundle\Model\DcaRelationsModel; use Codefog\HasteBundle\Util\ArrayPosition; -use Composer\InstalledVersions; use Contao\ArrayUtil; use Contao\Controller; use Contao\DataContainer; @@ -924,10 +923,9 @@ public function fetch(string $fieldName): mixed } $widget = $this->widgets[$fieldName]; - $contaoVersion = InstalledVersions::getVersion('contao/core-bundle') ?? InstalledVersions::getVersion('contao/contao'); // Support file uploads in Contao 5 - if (version_compare($contaoVersion, '5.0', '>=') && $widget instanceof UploadableWidgetInterface) { + if ($widget instanceof UploadableWidgetInterface) { return $widget->value; }