Skip to content

Instantly share code, notes, and snippets.

diff --git a/modules/cohesion_custom_styles/src/Entity/CustomStyle.php b/modules/cohesion_custom_styles/src/Entity/CustomStyle.php
index 5dab5c7..acc0268 100644
--- a/modules/cohesion_custom_styles/src/Entity/CustomStyle.php
+++ b/modules/cohesion_custom_styles/src/Entity/CustomStyle.php
@@ -313,7 +313,7 @@ class CustomStyle extends CohesionConfigEntityBase implements CohesionSettingsIn
// Patch in the settings.extended=true for child styles.
if ($this->getParentId()) {
- @ $entity_values->values->styles->settings->extended = TRUE;
+ @ $entity_values->values['styles']['settings']['extended'] = TRUE;
diff --git a/cohesion.services.yml b/cohesion.services.yml
index b6cfbda..b758a16 100644
--- a/cohesion.services.yml
+++ b/cohesion.services.yml
@@ -74,7 +74,7 @@ services:
cohesion.local_files_manager:
class: Drupal\cohesion\Services\LocalFilesManager
- arguments: ['@string_translation', '@config.factory', '@keyvalue', '@tempstore.shared', '@cohesion.utils']
+ arguments: ['@string_translation', '@config.factory', '@keyvalue', '@tempstore.shared', '@cohesion.utils', '@session']
@vishalkhode1
vishalkhode1 / gist:49951b9eedef7ec57d55b3d969194d38
Last active July 19, 2022 08:08
ORCA do not include sub-modules SUT as of Paremt
diff --git a/src/Domain/Fixture/FixtureCreator.php b/src/Domain/Fixture/FixtureCreator.php
index afd11cc..c7e544d 100644
--- a/src/Domain/Fixture/FixtureCreator.php
+++ b/src/Domain/Fixture/FixtureCreator.php
@@ -356,13 +356,23 @@ class FixtureCreator {
if (!$this->options->hasSut() && !$this->options->symlinkAll()) {
return;
}
-
+ if ($this->packageManager->exists('acquia/acquia_cms')) {
@vishalkhode1
vishalkhode1 / merge_plugin.patch
Last active January 20, 2023 05:57
Include merge-plugin to ORCA
diff --git a/src/Domain/Fixture/FixtureCreator.php b/src/Domain/Fixture/FixtureCreator.php
index c7e9d03..d8dca94 100644
--- a/src/Domain/Fixture/FixtureCreator.php
+++ b/src/Domain/Fixture/FixtureCreator.php
@@ -194,6 +194,7 @@ class FixtureCreator {
$this->removeComposerConfigPlatform();
$this->fixDefaultDependencies();
$this->addAllowedComposerPlugins();
+ $this->addMergePlugin();
$this->addCompanyPackages();
@vishalkhode1
vishalkhode1 / site-studio-allow-optional-packages.patch
Created September 8, 2022 20:02
Site Studio allow optional packages
diff --git a/modules/cohesion_sync/src/Services/DefaultModulePackage.php b/modules/cohesion_sync/src/Services/DefaultModulePackage.php
index 011b19b..79ea767 100644
--- a/modules/cohesion_sync/src/Services/DefaultModulePackage.php
+++ b/modules/cohesion_sync/src/Services/DefaultModulePackage.php
@@ -64,6 +64,10 @@ class DefaultModulePackage implements PackageSourceServiceInterface {
* Thrown if source metadata values are missing.
*/
public function preparePackage(array $sourceMetadata): string {
+ $isRequired = $sourceMetadata['required'] ?? TRUE;
+ if ($this->moduleHandler->moduleExists($sourceMetadata['module_name']) !== TRUE && !$isRequired) {
@vishalkhode1
vishalkhode1 / add-sud-path-reposories.patch
Created September 29, 2022 07:18
Add ORCA Sut Path repositories
diff --git a/src/Domain/Fixture/FixtureCreator.php b/src/Domain/Fixture/FixtureCreator.php
index c7e9d03..3982009 100644
--- a/src/Domain/Fixture/FixtureCreator.php
+++ b/src/Domain/Fixture/FixtureCreator.php
@@ -390,6 +390,14 @@ class FixtureCreator {
$this->fixture->getPath($package->getRepositoryUrlRaw())
);
}
+ $repositories = $this->composerJsonHelper->getSutPathRepositories($this->options->getSut());
+ foreach($repositories as $name => $repository) {
@vishalkhode1
vishalkhode1 / do-not-check-composer-in-submodule.patch
Last active October 3, 2022 18:09
Patch to skip checking composer.json in sub-module
diff --git a/src/Domain/Tool/ComposerValidate/ComposerValidateTask.php b/src/Domain/Tool/ComposerValidate/ComposerValidateTask.php
index 80cb536..2ab93f9 100644
--- a/src/Domain/Tool/ComposerValidate/ComposerValidateTask.php
+++ b/src/Domain/Tool/ComposerValidate/ComposerValidateTask.php
@@ -85,7 +85,7 @@ class ComposerValidateTask extends TaskBase {
private function checkForMissingComposerJson(SplFileInfo $info_file): void {
$composer_json =
str_replace($info_file->getFilename(), 'composer.json', $info_file->getPathname());
- if (!$this->filesystem->exists($composer_json)) {
+ if (!preg_match('#modules/(.*/){2,}#', $composer_json) && !$this->filesystem->exists($composer_json)) {
@vishalkhode1
vishalkhode1 / site-studio-optional-packages.patch
Created November 8, 2022 05:49
Site Studio allow optional package dependencies
diff --git a/modules/cohesion_sync/src/Services/DefaultModulePackage.php b/modules/cohesion_sync/src/Services/DefaultModulePackage.php
index 011b19b..d45bfe2 100644
--- a/modules/cohesion_sync/src/Services/DefaultModulePackage.php
+++ b/modules/cohesion_sync/src/Services/DefaultModulePackage.php
@@ -64,6 +64,14 @@ class DefaultModulePackage implements PackageSourceServiceInterface {
* Thrown if source metadata values are missing.
*/
public function preparePackage(array $sourceMetadata): string {
+ $dependencies = $sourceMetadata['dependencies'] ?? [];
+ if ($dependencies) {
@vishalkhode1
vishalkhode1 / config-sync-fixed
Created November 8, 2022 06:18
Config Sync issue fixed
diff --git a/modules/acquia_cms_article/config/optional/block.block.articles_article_type.yml b/modules/acquia_cms_article/config/optional/block.block.articles_article_type.yml
index 4539f1f1..55cd48bb 100644
--- a/modules/acquia_cms_article/config/optional/block.block.articles_article_type.yml
+++ b/modules/acquia_cms_article/config/optional/block.block.articles_article_type.yml
@@ -11,7 +11,7 @@ dependencies:
- cohesion_theme
third_party_settings:
collapsiblock:
- collapse_action: '2'
+ collapse_action: 2
@vishalkhode1
vishalkhode1 / do-not-import-package-when-syncing.patch
Created November 22, 2022 08:04
Do Not Import SS packages when syncing
diff --git a/modules/cohesion_sync/cohesion_sync.module b/modules/cohesion_sync/cohesion_sync.module
index 7047081..e13affb 100644
--- a/modules/cohesion_sync/cohesion_sync.module
+++ b/modules/cohesion_sync/cohesion_sync.module
@@ -62,10 +62,10 @@ function cohesion_sync_entity_operation_alter(array &$operations, EntityInterfac
/**
* Implements hook_modules_installed().
*/
-function cohesion_sync_modules_installed($modules) {
+function cohesion_sync_modules_installed($modules, $is_syncing) {