Skip to content

Conversation

DanieleAlessandra
Copy link
Collaborator

…mposer loads (Bedrock/Altis)

When the SDK is autoloaded via Composer before WP finishes bootstrapping (e.g., Bedrock/Altis), the “latest SDK” selection logic can call WP functions that aren’t available yet (e.g. get_theme_root()), causing a fatal. This change introduces a guard that, when FS__SKIP_LATEST_SDK_LOADING is defined and true, skips that logic entirely and exposes a minimal fs_dynamic_init() no-op to avoid undefined-function errors.

Details:
• Guard placed right after the ABSPATH check in start.php.
• If the flag is set, define a stub fs_dynamic_init() and return; early.
• Keeps default behavior unchanged for all other environments.
• Helps integrators who load the SDK from vendor/ before WP is ready.
• Version bumped to 2.12.2.1.

Notes:
• The constant must be defined before the SDK is loaded (e.g., in wp-config.php or via Composer autoload.files preload in Bedrock).
• Follow-up: document usage and caveats.

…mposer loads (Bedrock/Altis)

When the SDK is autoloaded via Composer before WP finishes bootstrapping (e.g., Bedrock/Altis), the “latest SDK” selection logic can call WP functions that aren’t available yet (e.g. get_theme_root()), causing a fatal.
This change introduces a guard that, when FS__SKIP_LATEST_SDK_LOADING is defined and true, skips that logic entirely and exposes a minimal fs_dynamic_init() no-op to avoid undefined-function errors.

Details:
	•	Guard placed right after the ABSPATH check in start.php.
	•	If the flag is set, define a stub fs_dynamic_init() and return; early.
	•	Keeps default behavior unchanged for all other environments.
	•	Helps integrators who load the SDK from vendor/ before WP is ready.
	•	Version bumped to 2.12.2.1.

Notes:
	•	The constant must be defined before the SDK is loaded (e.g., in wp-config.php or via Composer autoload.files preload in Bedrock).
	•	Follow-up: document usage and caveats.
@DanieleAlessandra DanieleAlessandra marked this pull request as ready for review September 25, 2025 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants