From 13659dfb4d9056e647608fcbc5f295977261422a Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Fri, 22 May 2026 21:56:24 +0300 Subject: [PATCH 1/2] Ensure Composer metadata is included in GitHub release artifacts Signed-off-by: Kaspars Dambis --- .gitattributes | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 3bee9f50..65a9bfa5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,8 +9,6 @@ phpunit.xml.dist export-ignore wp-tests-config-sample.php export-ignore phpcs.xml.dist export-ignore -composer.json export-ignore -composer.lock export-ignore package.json export-ignore package-lock.json export-ignore .wp-env.json export-ignore From ba83d1ac569995001a59654dbfe41f787a496ed0 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Fri, 22 May 2026 21:56:49 +0300 Subject: [PATCH 2/2] Load only if available Assume that a global autoload is available otherwise (plugin added via composer) Signed-off-by: Kaspars Dambis --- plugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin.php b/plugin.php index 8f5803b6..78acc1aa 100644 --- a/plugin.php +++ b/plugin.php @@ -25,7 +25,11 @@ const PLUGIN_DIR = __DIR__; const PLUGIN_FILE = __FILE__; -require_once __DIR__ . '/vendor/autoload.php'; +// Use local autoload if available. +if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { + require_once __DIR__ . '/vendor/autoload.php'; +} + require_once __DIR__ . '/inc/namespace.php'; require_once __DIR__ . '/inc/avatars/namespace.php'; require_once __DIR__ . '/inc/credits/namespace.php';