Skip to content

Commit

Permalink
#9913 removed Services::get reference from older upgrade migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Aug 1, 2024
1 parent 475b8be commit 86d9fe1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace PKP\migration\upgrade;

use APP\core\Services;
use APP\facades\Repo;
use Exception;
use Illuminate\Database\PostgresConnection;
Expand Down Expand Up @@ -412,7 +411,7 @@ protected function migrateSubmissionFiles()
'sf.original_file_name',
'rrf.review_round_id'
]);
$fileService = Services::get('file');
$fileService = app()->get('file');
$lastFileId = null;
$lastReviewRoundId = null;
$lastInsertedFileId = DB::table('submission_files')->max('file_id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace PKP\migration\upgrade\v3_4_0;

use APP\core\Services;
use Illuminate\Support\Facades\DB;
use PKP\install\DowngradeNotSupportedException;
use PKP\migration\Migration;
Expand Down Expand Up @@ -94,7 +93,7 @@ public function up(): void

// Migrate context settings
// Get all, also disabled, contexts
$contextIds = Services::get('context')->getIds();
$contextIds = app()->get('context')->getIds();
foreach ($contextIds as $contextId) {
$contextDisplayStatistics = $contextChartType = null;
$contextDisplayStatistics = DB::table('plugin_settings')
Expand Down
3 changes: 1 addition & 2 deletions classes/migration/upgrade/v3_4_0/InstallEmailTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace PKP\migration\upgrade\v3_4_0;

use APP\core\Services;
use Exception;
use Illuminate\Support\Facades\DB;
use PKP\db\XMLDAO;
Expand All @@ -38,7 +37,7 @@ public function up(): void
throw new Exception('Unable to find <email> entries in registry/emailTemplates.xml.');
}

$contextIds = Services::get('context')->getIds();
$contextIds = app()->get('context')->getIds();
$locales = json_decode(
DB::table('site')->pluck('installed_locales')->first()
);
Expand Down

0 comments on commit 86d9fe1

Please sign in to comment.