Skip to content

Commit f88eb1d

Browse files
committed
Portfolio: Remove PortfolioAttachmentRepository
1 parent 1ea7fcd commit f88eb1d

File tree

2 files changed

+3
-60
lines changed

2 files changed

+3
-60
lines changed

src/CoreBundle/Migrations/Schema/V200/Version20250927180004.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66

77
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
88

9-
use Chamilo\CoreBundle\Entity\PortfolioAttachment;
9+
use Chamilo\CoreBundle\Entity\Portfolio;
1010
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
1111
use Chamilo\CoreBundle\Repository\Node\PortfolioCommentRepository;
1212
use Chamilo\CoreBundle\Repository\Node\PortfolioRepository;
13-
use Chamilo\CoreBundle\Repository\PortfolioAttachmentRepository;
1413
use Doctrine\DBAL\Schema\Schema;
1514

1615
class Version20250927180004 extends AbstractMigrationChamilo
@@ -22,9 +21,6 @@ public function getDescription(): string
2221

2322
public function up(Schema $schema): void
2423
{
25-
/** @var PortfolioAttachmentRepository $attachmentRepo */
26-
$attachmentRepo = $this->container->get(PortfolioAttachmentRepository::class);
27-
2824
/** @var PortfolioRepository $itemRepo */
2925
$itemRepo = $this->container->get(PortfolioRepository::class);
3026

@@ -41,7 +37,7 @@ public function up(Schema $schema): void
4137
$resource = null;
4238
$resourceRepo = null;
4339

44-
if (PortfolioAttachment::TYPE_ITEM === (int) $attachmentRow['origin_type']) {
40+
if (Portfolio::TYPE_ITEM === (int) $attachmentRow['origin_type']) {
4541
$resourceRepo = $itemRepo;
4642
$resource = $itemRepo->find($attachmentRow['origin_id']);
4743

@@ -51,7 +47,7 @@ public function up(Schema $schema): void
5147
;
5248

5349
$userId = $itemRow['user_id'] ?? 0;
54-
} elseif (PortfolioAttachment::TYPE_COMMENT === (int) $attachmentRow['origin_type']) {
50+
} elseif (Portfolio::TYPE_COMMENT === (int) $attachmentRow['origin_type']) {
5551
$resourceRepo = $commentRepo;
5652
$resource = $commentRepo->find($attachmentRow['origin_id']);
5753

src/CoreBundle/Repository/PortfolioAttachmentRepository.php

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)