Skip to content

Instantly share code, notes, and snippets.

@vishalkhode1
vishalkhode1 / pin-drupal-test-traits-version.patch
Created October 25, 2024 09:17
Update proper version for weitzman/drupal-test-traits library
diff --git a/config/packages.yml b/config/packages.yml
index c7e24ad..f4f7cdf 100644
--- a/config/packages.yml
+++ b/config/packages.yml
@@ -192,9 +192,13 @@ drush/drush:
# @todo remove this via ORCA-298
weitzman/drupal-test-traits:
is_company_package: false
- version: '*'
- version_dev: '*'
@vishalkhode1
vishalkhode1 / fix-openapi-jsonapi-module.patch
Created July 16, 2024 18:21
Fixes the error for openapi_jsonapi module
diff --git a/src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php b/src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
index e231596..09224c4 100644
--- a/src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
+++ b/src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
@@ -46,7 +46,7 @@ class JsonApiGenerator extends OpenApiGeneratorBase {
*
* @var string
*/
- static $DEFINITION_SEPARATOR = '--';
+ static string $DEFINITION_SEPARATOR = '--';
@vishalkhode1
vishalkhode1 / 3176615-route-not-found-exception.patch
Created July 15, 2024 20:00
Checks if jsonapi route exists
diff --git a/src/EventSubscriber/RouterPathTranslatorSubscriber.php b/src/EventSubscriber/RouterPathTranslatorSubscriber.php
index 7ab84ea..a8c7da1 100644
--- a/src/EventSubscriber/RouterPathTranslatorSubscriber.php
+++ b/src/EventSubscriber/RouterPathTranslatorSubscriber.php
@@ -25,6 +25,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
+use Symfony\Component\Routing\Exception\RouteNotFoundException;
use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
@vishalkhode1
vishalkhode1 / cohesion-10.3.0.patch
Created June 21, 2024 15:10
Patch to fix on Drupal Core 10.3.0
From 3a66d516df0debd1bc798c468bdb659b30b65c72 Mon Sep 17 00:00:00 2001
From: Vishal Khode <vishal.khode@acquia.com>
Date: Fri, 21 Jun 2024 19:19:40 +0530
Subject: [PATCH] ACMS-3441: Fixed the module installation error on Drupal Core
10.3.0.
---
.../cohesion_sync/cohesion_sync.services.yml | 2 +-
.../Import/SyncConfigImportSubscriber.php | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
@vishalkhode1
vishalkhode1 / 10.3.x-ci-fix.patch
Created May 6, 2024 19:34
ORCA fix for Drupal core 10.3.x
diff --git a/src/Domain/Fixture/Helper/DrupalSettingsHelper.php b/src/Domain/Fixture/Helper/DrupalSettingsHelper.php
index 2639104..00f00a1 100644
--- a/src/Domain/Fixture/Helper/DrupalSettingsHelper.php
+++ b/src/Domain/Fixture/Helper/DrupalSettingsHelper.php
@@ -136,31 +136,6 @@ PHP;
}
$data .= PHP_EOL . <<<'PHP'
-// Override the definition of the service container used during Drupal
-// bootstraps so that the core db-tools.php script can import database dumps
@vishalkhode1
vishalkhode1 / support-drupal11.patch
Last active July 29, 2024 19:55
ORCA updated to support Drupal 11
diff --git a/config/packages.yml b/config/packages.yml
index d0b3720..1933afa 100644
--- a/config/packages.yml
+++ b/config/packages.yml
@@ -85,8 +85,13 @@ drupal/acquia_connector:
# Removed due to outage caused by drupal/s3fs on 27/05/2024 from Drupal 10.3.x
drupal/acquia_contenthub:
- version: 3.5.x
- version_dev: 3.5.x
@vishalkhode1
vishalkhode1 / custom-tests-bootstrap.patch
Last active March 14, 2024 12:16
Custom tests bootstrap in project.
diff --git a/src/Domain/Tool/Phpunit/PhpUnitTask.php b/src/Domain/Tool/Phpunit/PhpUnitTask.php
index 246e5bc..af6d6b9 100644
--- a/src/Domain/Tool/Phpunit/PhpUnitTask.php
+++ b/src/Domain/Tool/Phpunit/PhpUnitTask.php
@@ -274,9 +274,11 @@ class PhpUnitTask extends TestFrameworkBase {
// The bootstrap script is located in ORCA's vendor directory, not the
// fixture's, since ORCA controls the available test frameworks and
// infrastructure.
+ $boostrap = $this->orca->getPath('vendor/weitzman/drupal-test-traits/src/bootstrap.php');
+ $boostrap = $this->envFacade->get("ORCA_TEST_BOOTSTRAP_FILE", $boostrap);
@vishalkhode1
vishalkhode1 / geocoder-revert.patch
Created December 4, 2023 20:53
Geocoder Revert patch
diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php
index 3ad1149..17509e1 100644
--- a/src/Form/SettingsForm.php
+++ b/src/Form/SettingsForm.php
@@ -16,9 +16,9 @@ class SettingsForm extends ConfigFormBase {
/**
* The typed config service.
*
- * @var \Drupal\Core\Config\TypedConfigManagerInterface|null
+ * @var \Drupal\Core\Config\TypedConfigManagerInterface
@vishalkhode1
vishalkhode1 / orca-oldest-support.patch
Created November 9, 2023 06:04
ORCA Oldest Support
diff --git a/src/Domain/Composer/Version/DrupalDotOrgApiClient.php b/src/Domain/Composer/Version/DrupalDotOrgApiClient.php
index 0cefdac..605dd42 100644
--- a/src/Domain/Composer/Version/DrupalDotOrgApiClient.php
+++ b/src/Domain/Composer/Version/DrupalDotOrgApiClient.php
@@ -50,26 +50,7 @@ class DrupalDotOrgApiClient {
* @noinspection PhpDocMissingThrowsInspection
*/
public function getOldestSupportedDrupalCoreBranch(): string {
- if ($this->oldestSupportedDrupalCoreBranch) {
- return $this->oldestSupportedDrupalCoreBranch;
@vishalkhode1
vishalkhode1 / sitestudio_config_management.patch
Created August 16, 2023 08:35
Site Studio config management patch
diff --git a/src/Commands/PostConfigImportHook.php b/src/Commands/PostConfigImportHook.php
index 3f47190..568b5d1 100644
--- a/src/Commands/PostConfigImportHook.php
+++ b/src/Commands/PostConfigImportHook.php
@@ -41,10 +41,10 @@ class PostConfigImportHook extends DrushCommands {
$this->logger->warning("Skipping Site studio package import as Site Studio is not configured.");
return;
}
+ $this->addCommand("cohesion:import");
$this->addCommand("sitestudio:package:import");