Repository navigation
Two fixes: a module whose name ends with p or h loads again, and bones deploy no longer says it succeeded when it copied nothing.
Helpers
wpbones_modules()andimport()load the module they are named after (#144, fixes #142, reported by @bardrop). The name went throughrtrim($file, '.php'), and the second argument ofrtrim()is a set of characters, not a suffix: every trailing.,pandhwas stripped, sowpbones_modules('shop')requiredplugin/modules/sho.php,'graph'requiredgra.php,'Help.php'requiredHel.php, each ending in a fatal error. It had been so since the helper arrived in 1.8.0. Now.phpis appended only when the name does not already end with it.
bones
deploycreates a missing destination parent, and a failed copy fails the deploy (#143, fixes #139).php bones deploy /tmp/missing-parent/my-plugincopied nothing: every write failed with a PHP warning, and the deploy still printed✅ Deploy completed!and exited with0. The missing parents are now created, once the destination checks have passed, and a folder or file the deploy cannot write stops it withDeploy failed: could not write '<path>'and exit status1; with--create-zipthe staging folder is removed and no zip is written. A.or..after a missing folder is refused, since it would resolve through a link the checks never followed;deploy ../deploy-versionfrom the plugin works as before.- Replacing an existing destination touches only that folder (#143). The folder was emptied through
glob(), so a destination whose name holds[,*,?or{was read as a pattern: replacingx[ab]emptiedxa/andxb/instead. A symlinked folder inside an old destination was followed and its target emptied too. Both are gone: the deploy walks the folder's real entries and unlinks a link without following it.
Upgrading
composer update wpbones/wpbones. Nothing to change.
Docs: Hooks and Modules · Where the deploy goes
Full Changelog: v3.3.0...v3.3.1