Skip to content

Commit

Permalink
ACMS-1861: Fix Drupal Check notices for Drupal 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshreeputra committed Jun 23, 2023
1 parent 94ba297 commit 8fbed49
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,17 @@ public function getParity($configFile, StorageInterface $syncStorage) {
$diff = new Diff($original_configuration, $active_configuration);
$totalLines = count($active_configuration);
$editedLines = 0;
// @todo remove phpstan-ignore-next-line once we have the replcement
// for the deprecations in Drupal\Component\Diff\Diff, update accordingly
// in ACMS-1868.
// @phpstan-ignore-next-line
if (!$diff->isEmpty()) {
foreach ($diff->getEdits() as $diffOp) {
if ($diffOp->type !== 'copy') {
// @todo remove phpstan-ignore-next-line once we have the replcement
// for the deprecations in Drupal\Component\Diff\Diff, update
// accordingly in ACMS-1868.
// @phpstan-ignore-next-line
$editedLines += $diffOp->nclosing();
}
}
Expand Down
3 changes: 2 additions & 1 deletion modules/acquia_cms_common/src/Commands/AcmsCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function importSiteStudioPackages() {
public function starterKit($filter = '', $options = [
'project' => self::REQ,
'format' => 'table',
]) {
]): bool|string|array {
if ($starter_kit = $this->acmsUtilityService->getStarterKit()) {
$data['starter-kit'] = $starter_kit;
$result = new PropertyList($data);
Expand All @@ -286,6 +286,7 @@ function ($key, $cellData, FormatterOptions $options, $rowData) {
return $result;
}
$this->output()->writeln('Starter-kit is not installed yet.');
return FALSE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Drupal\Core\Extension\ThemeHandlerInterface;
use Drupal\Core\Lock\LockBackendInterface;
use Drupal\Core\StringTranslation\TranslationInterface;
use Drupal\Core\Utility\Error;
use Drush\Log\DrushLoggerManager;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

Expand Down Expand Up @@ -209,7 +210,7 @@ public function doImport(StorageComparer $storage_comparer, DrushLoggerManager $
$message = 'The import failed due to the following reasons:' . "\n";
$message .= implode("\n", $config_importer->getErrors());

watchdog_exception('config_import', $e);
Error::logException('config_import', $e);
throw new \Exception($message);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class DefaultContentUpdateEventTest extends UnitTestCase {
* Before a test method is run, setUp() is invoked.
*/
public function setUp(): void {
parent::setUp();
$this->updateEvent = new DefaultContentEventUpdate();
}

Expand Down
4 changes: 2 additions & 2 deletions tests/src/ExistingSite/InstallStateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public function testConfig(): void {
// Check page caching set for one year and css/js are aggregated.
$performance_config = $this->config('system.performance');
$this->assertSame(31536000, $performance_config->get('cache.page.max_age'));
$this->assertSame(TRUE, $performance_config->get('css.preprocess'));
$this->assertSame(TRUE, $performance_config->get('js.preprocess'));
$this->assertTrue($performance_config->get('css.preprocess'));
$this->assertTrue($performance_config->get('js.preprocess'));

// Check purge configurations incorporating acquia purge.
$purge_plugin_config = $this->config('purge.plugins');
Expand Down

0 comments on commit 8fbed49

Please sign in to comment.