Skip to content

v3.3.1

Latest

Choose a tag to compare

@gfazioli gfazioli released this 23 Nov 10:54

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() and import() load the module they are named after (#144, fixes #142, reported by @bardrop). The name went through rtrim($file, '.php'), and the second argument of rtrim() is a set of characters, not a suffix: every trailing ., p and h was stripped, so wpbones_modules('shop') required plugin/modules/sho.php, 'graph' required gra.php, 'Help.php' required Hel.php, each ending in a fatal error. It had been so since the helper arrived in 1.8.0. Now .php is appended only when the name does not already end with it.

bones

  • deploy creates a missing destination parent, and a failed copy fails the deploy (#143, fixes #139). php bones deploy /tmp/missing-parent/my-plugin copied nothing: every write failed with a PHP warning, and the deploy still printed ✅ Deploy completed! and exited with 0. The missing parents are now created, once the destination checks have passed, and a folder or file the deploy cannot write stops it with Deploy failed: could not write '<path>' and exit status 1; with --create-zip the 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-version from 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: replacing x[ab] emptied xa/ and xb/ 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