Skip to content

v2.0.10

Choose a tag to compare

@gfazioli gfazioli released this 24 Sep 12:33
· 14 commits to master since this release

A safety release for the bones CLI. Everything below was reproduced before it was fixed; nothing that worked changes, except where the old behaviour destroyed something.

deploy

  • The destination is checked before anything is built. The plugin itself, any folder that contains it and any folder inside it are always refused. Up to 2.0.9 an existing destination was deleted after a five-second pause: php bones deploy .. removed every plugin beside yours and the plugin itself, and deploy build copied the plugin into build/build/build/… until the path was too long.
  • An existing folder is replaced only when it is empty or holds a previous deploy of this plugin (its main file, same Plugin Name). Anything else is left alone and needs the new --force. The pause is gone.

make:*

  • They never overwrite an existing file; pass --force to do it.
  • Names are validated: PHP class names, / between folders, no ...
  • Folder/Class works in every generator, and the namespace follows the folder. make:provider Folder/Class used to write nothing, several generators wrote into folders they never created, and all of them said "Created" when the write failed.
  • make:eloquent-model wrote namespace …\Models\;, which never parsed.
  • migrate:create asks for a missing name instead of a fatal TypeError, and creates database/migrations.

tinker

  • Errors are shown (they used to print nothing), an exception's message is printed (it used to be run as code), returned values are printed, and the shell ends with exit, Ctrl-D or the end of its input (it used to recurse until the process died).

Exit codes

  • An unknown command, a missing name and a declined confirmation exit 1, with the error on stderr. A version nobody answered used to exit 0 having changed nothing; in a script, pipe the answer: echo y | php bones version 1.2.0.
  • install, optimize, update and require show Composer's output as it runs and use its status: optimize could crash with a TypeError after a make:*, and require renamed after a failed install.

Upgrading

Drop-in for 2.0.x: composer update wpbones/wpbones. Scripts that relied on a declined prompt exiting 0 will now see 1.

Full Changelog: v2.0.9...v2.0.10