v2.0.10
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, anddeploy buildcopied the plugin intobuild/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
--forceto do it. - Names are validated: PHP class names,
/between folders, no... Folder/Classworks in every generator, and the namespace follows the folder.make:provider Folder/Classused to write nothing, several generators wrote into folders they never created, and all of them said "Created" when the write failed.make:eloquent-modelwrotenamespace …\Models\;, which never parsed.migrate:createasks for a missing name instead of a fatal TypeError, and createsdatabase/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
versionnobody answered used to exit 0 having changed nothing; in a script, pipe the answer:echo y | php bones version 1.2.0. install,optimize,updateandrequireshow Composer's output as it runs and use its status:optimizecould crash with a TypeError after amake:*, andrequirerenamed 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