[codex] Fix Push MD toolkit loading and clone blockers#49
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Push MD activation and clone blockers found while testing on WordPress.com staging.
/info/refsfailures instead of opaque REST 500s.post/post-4937.md, to avoidpost/.mdcollisions.cmd.exequoting failures.Root Cause
WordPress.com SH (
wpcomsh) already bundleswp-php-toolkit/filesystem, so Push MD's bundled toolkit could redeclare namespaced helper functions during activation. After activation was fixed, authenticated clone exposed two runtime issues:/info/refserrors were surfaced as REST 500s, and draft posts with empty slugs collided on the same export path.The follow-up fallback-path fix avoids treating generated filenames such as
post/post-4937.mdas desired WordPress slugs. If WordPress later assigns a canonical slug, Push MD now asks the user to pull the slug-based path before editing rather than silently moving content back to the generated fallback path.The Windows CI failure came from passing inline PHP snippets through
php -rinside a shell command. The tests now write a temporary PHP script and invoke PHP with shell bypassing enabled on Windows.Validation
vendor/bin/phpunit -c phpunit.xmlvendor/bin/phpunit -c phpunit.xml components/Filesystem/Tests/FunctionsTest.phpvendor/bin/phpunit -c phpunit.xml --filter PMD_Bootstrap_Compatibility_Test plugins/push-md/Tests/vendor/bin/phpunit -c phpunit.xml plugins/push-md/Tests/vendor/bin/phpunit -c phpunit.xml components/Filesystem/Tests/ components/Git/Tests/ components/Zip/Tests/ components/DataLiberation/Tests/ components/Encoding/Tests/composer testphp -l plugins/push-md/class-pmd-plugin.php && php -l plugins/push-md/Tests/ExportPathTest.phpphp -l plugins/push-md/Tests/BootstrapCompatibilityTest.php && php -l components/Filesystem/Tests/FunctionsTest.phpvendor/bin/phpcs -d memory_limit=1G plugins/push-md/class-pmd-plugin.php plugins/push-md/Tests/ExportPathTest.phpvendor/bin/phpcs -d memory_limit=1G plugins/push-md/Tests/BootstrapCompatibilityTest.php components/Filesystem/Tests/FunctionsTest.phpgit diff --checkdist/plugins/push-md.zipand/Users/artpi/Desktop/push-md.zipgit clonesucceeds into~/Desktop/site-titleNote: repo-wide
composer lintstill exits on pre-existing warning-level findings outside this change; scoped PHPCS for touched files passes.