diff --git a/_patches/stellarwp-shepherd-correct-container-typehint.patch b/_patches/stellarwp-shepherd-correct-container-typehint.patch new file mode 100644 index 0000000000..7ec082a2ff --- /dev/null +++ b/_patches/stellarwp-shepherd-correct-container-typehint.patch @@ -0,0 +1,11 @@ +--- a/src/Config.php ++++ b/src/Config.php +@@ -10,7 +10,7 @@ + namespace StellarWP\Shepherd; + + use StellarWP\Shepherd\Config\Container; +-use StellarWP\ContainerContract\ContainerInterface; ++use TEC\Common\StellarWP\ContainerContract\ContainerInterface; + use TypeError; + + class Config { diff --git a/_patches/stellarwp-shepherd-remove-files-autoload.patch b/_patches/stellarwp-shepherd-remove-files-autoload.patch new file mode 100644 index 0000000000..eb315cd675 --- /dev/null +++ b/_patches/stellarwp-shepherd-remove-files-autoload.patch @@ -0,0 +1,12 @@ +--- a/composer.json ++++ b/composer.json +@@ -28,8 +28,5 @@ + "psr-4": { + "StellarWP\\Shepherd\\": "src/" + } +- }, +- "files": [ +- "src/functions.php" +- ] ++ } + } diff --git a/composer.json b/composer.json index 80b91385d1..953572c7be 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "stellarwp/installer": "^1.1.0", "stellarwp/models": "dev-main", "stellarwp/schema": "2.0.1", - "stellarwp/shepherd": "dev-temp-no-namespace-files", + "stellarwp/shepherd": "dev-fix/php-74-standalone", "stellarwp/telemetry": "^2.3.4", "stellarwp/uplink": "2.2.2" }, @@ -159,6 +159,10 @@ "patches": { "fakerphp/faker": { "Use prefixed Psr\\Container\\ContainerInterface": "tests/_patches/faker-use-prefixed-containerinterface.patch" + }, + "stellarwp/shepherd": { + "Remove files autoload": "common/_patches/stellarwp-shepherd-remove-files-autoload.patch", + "Correct Container type-hint": "_patches/stellarwp-shepherd-correct-container-typehint.patch" } } } diff --git a/src/Tribe/Main.php b/src/Tribe/Main.php index 344d9ada5a..c0438a369a 100644 --- a/src/Tribe/Main.php +++ b/src/Tribe/Main.php @@ -81,6 +81,9 @@ public function __construct( $context = null ) { $vendor_folder = dirname( dirname( dirname( __FILE__ ) ) ) . '/vendor/'; require_once realpath( $vendor_folder . 'vendor-prefixed/autoload.php' ); + // Manually require the prefixed functions.php file. + require_once realpath( $vendor_folder . '/vendor-prefixed/stellarwp/shepherd/src/functions.php' ); + require_once realpath( $vendor_folder . 'autoload.php' ); // The DI container class.