From 11f6fd7a5ed86ca3b18ad3735639c3fdd0f1ae63 Mon Sep 17 00:00:00 2001
From: "Kolevatov.A" <mail@artkolev.ru>
Date: Mon, 28 Oct 2024 12:19:59 +0300
Subject: [PATCH 1/2] =?UTF-8?q?86419:=20=D1=84=D0=B8=D0=BA=D1=81=D1=8B=20?=
 =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/core/catalog/product/model/Product.php         | 4 ++--
 src/core/file/data_handler/FileBinder.php          | 2 +-
 src/core/file/data_handler/FileBinderOptimized.php | 4 ++--
 src/core/file/repository/FileRepository.php        | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/core/catalog/product/model/Product.php b/src/core/catalog/product/model/Product.php
index ea88c75..bab0883 100644
--- a/src/core/catalog/product/model/Product.php
+++ b/src/core/catalog/product/model/Product.php
@@ -167,7 +167,7 @@ class Product extends ActiveRecord implements
                 'file.model_file',
                 ['model_id' => 'id'],
                 static fn ($q) => $q->andWhere([
-                    'file.model_file.model_class' => self::getClass(),
+                    'file.model_file.model_class' => self::class,
                     'file.model_file.field_name' => 'images',
                 ])
             );
@@ -180,7 +180,7 @@ class Product extends ActiveRecord implements
                 'file.model_file',
                 ['model_id' => 'id'],
                 static fn ($q) => $q->andWhere([
-                    'file.model_file.model_class' => self::getClass(),
+                    'file.model_file.model_class' => self::class,
                     'file.model_file.field_name' => 'certificates',
                 ])
             );
diff --git a/src/core/file/data_handler/FileBinder.php b/src/core/file/data_handler/FileBinder.php
index a58fb8e..3a70f8e 100644
--- a/src/core/file/data_handler/FileBinder.php
+++ b/src/core/file/data_handler/FileBinder.php
@@ -46,7 +46,7 @@ class FileBinder extends DataHandler
         foreach ($fileIdsToInsert as $fileId) {
             $binding = new ModelFile([
                 'file_id' => $fileId,
-                'model_class' => $this->model::getClass(),
+                'model_class' => $this->model::class,
                 'model_id' => $this->model->getId(),
                 'field_name' => $this->fieldName,
             ]);
diff --git a/src/core/file/data_handler/FileBinderOptimized.php b/src/core/file/data_handler/FileBinderOptimized.php
index 32fcad9..b84272f 100644
--- a/src/core/file/data_handler/FileBinderOptimized.php
+++ b/src/core/file/data_handler/FileBinderOptimized.php
@@ -35,12 +35,12 @@ class FileBinderOptimized extends DataHandler
         ModelFile::deleteAll([
             'file_id' => $fileIdsToDelete,
             'model_id' => $this->model->getId(),
-            'model_class' => $this->model::getClass(),
+            'model_class' => $this->model::class,
             'field_name' => $this->fieldName,
         ]);
 
         $cols = [
-            $this->model::getClass(),
+            $this->model::class,
             $this->model->getId(),
             $this->fieldName,
         ];
diff --git a/src/core/file/repository/FileRepository.php b/src/core/file/repository/FileRepository.php
index 624bcb9..4de5549 100644
--- a/src/core/file/repository/FileRepository.php
+++ b/src/core/file/repository/FileRepository.php
@@ -90,7 +90,7 @@ class FileRepository implements FileRepositoryInterface
             ->addSelect(['file.file.id', 'file.file.name', 'file.file.link', 'file.file.size', 'file.file.created_at', 'file.model_file.field_name'])
             ->rightJoin('file.model_file', 'file.model_file.file_id=file.file.id')
             ->andWhere([
-                'model_class' => $model::getClass(),
+                'model_class' => $model::class,
                 'model_id' => $model->getId(),
             ])
             ->andFilterWhere([
-- 
GitLab


From b758cedab34c84cfb813a1707f04032b12702e27 Mon Sep 17 00:00:00 2001
From: "Kolevatov.A" <mail@artkolev.ru>
Date: Mon, 28 Oct 2024 12:23:42 +0300
Subject: [PATCH 2/2] =?UTF-8?q?86419:=20=D1=84=D0=B8=D0=BA=D1=81=20=D0=B7?=
 =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index ff221c1..d75d9cc 100644
--- a/composer.json
+++ b/composer.json
@@ -45,7 +45,7 @@
     "php": "^8.1",
     "yiisoft/yii2": "^2",
     "palax/core": "^0",
-    "palax/yii2-core": "^0.10.5",
+    "palax/yii2-core": "^1.0",
     "palax/enum-core": "^0",
     "carono/commerceml": "*",
     "ext-pdo_pgsql": "*",
-- 
GitLab