What's new since August 2024

๐Ÿฆด WP Bones is back on Product Hunt: 33 releases since the first launch

On August 5, 2024 WP Bones launched here at 1.5.5: a framework that brings Laravel's habits to WordPress plugins. Two years and 33 releases later (1.6.0 โ†’ 3.0.0), here's what's new ๐Ÿ‘‡

๐Ÿ”’ Secure by default (3.0)

๐Ÿšช Pages and menus that declare no capability need manage_options; REST routes without a permission_callback refuse every request

๐Ÿ›ก๏ธ Every request that changes something on a WP Bones admin page carries the plugin's nonce: $plugin->csrfField() in the form, checked before any controller runs; logged Ajax actions need one too

๐Ÿ—„๏ธ Migrations run once per site, recorded in an option, on activation or after a version change, however the update arrived; a lock keeps two requests from running them twice; seeders are migrations now

๐Ÿ“ Compiled Blade views and logs go to uploads/wpbones/, behind an index.php and a deny-all .htaccess

๐Ÿงญ php bones migrate:to-v3 converts the migrations and seeders, then lists the pages, routes, forms and Ajax providers that still need a look. Upgrading from 2.x:

composer require "wpbones/wpbones:^3.0"
php bones migrate:to-v3

โš™๏ธ A modern build (2.0)

๐Ÿ“ฆ One webpack config on /scripts finds every app, script and stylesheet in resources/assets: TypeScript and LESS out of the box, no more Gulp

โœจ php bones make:app scaffolds a React/TypeScript admin app; php bones migrate:to-v2 moves a 1.x plugin over

๐Ÿงฐ The bones CLI, 27 commands

๐Ÿ›Ÿ Generators never overwrite a file unless you pass --force; Folder/Class works in every one of them

๐Ÿšš deploy checks where it's going before it builds, stops on a failed build, leaves out what git ignores and Composer's dev packages, and can create a ZIP

๐Ÿƒ Runs from any folder; rename touches only what changes; update no longer removes the framework first

๐Ÿงช php bones tinker shows errors and values; custom commands can load WordPress and reach your plugin

โฐ make:schedule for WordPress cron jobs

๐Ÿ—„๏ธ Database

๐Ÿ” The query builder escapes every value and validates identifiers

๐Ÿชถ Eloquent on SQLite, so it works in WordPress Playground and Studio, and on MySQL with WordPress's own charset: emoji survive the round trip

๐Ÿท๏ธ Tables with or without the WordPress prefix

๐Ÿงฉ Boilerplates and demos

๐Ÿ“š From 2 boilerplates to 14: API, Base, Blade, Cron, Custom Post Types, Database, Hooks, Internationalization, Mantine, Options, Packages, React, Routes, TypeScript

โ–ถ๏ธ Each one opens in WordPress Playground from before you clone it

๐Ÿงช Tested

โœ… From no test suite to 350 tests and 897 assertions, on PHP 8.1 to 8.4, on every pull request; a deprecation fails the build

๐Ÿงก And more

๐ŸŒ Translations for React apps and blocks, with make-pot and make-json scripts

๐Ÿšฉ A Flags package for feature flags from YAML files

๐ŸŽจ Asset managers that enqueue admin and front-end scripts the WordPress way

๐Ÿ” WP Bones for Raycast: the docs and the boilerplates one keystroke away

๐Ÿ“– A new home at , with upgrade guides for 2.0 and 3.0

Thanks to everyone who sent code: dansleboby, balazsnasz and bredecl on GitHub ๐Ÿ™

Free and open source ยท PHP 8.1+ โ†’

What should WP Bones learn next? Tell me below ๐Ÿ‘‡

50 views

Add a comment

Replies

Be the first to reply

Have a question or a thought to share? Add a comment above to start the conversation.