🩹 WP Bones 2.1.1 β€” activation finds its own plugin

WP Bones 2.1.1 is out 🦴 a small patch, two fixes 🩹

πŸ”‘ Activation sees its own plugin. Since 1.8.0 the activation hook ran with an empty slug and no version, so the options it aligned were saved to a row with no name. Fixed.

πŸ—„οΈ migrate:create creates the table you name. It always wrote my_plugin_products.

βœ… One more test in the suite, 175 now, on PHP 8.1 to 8.4.

⬆️ composer update wpbones/wpbones

πŸ‘‰ Docs, boilerplates and live Playground demos:

Ever bumped into either of these? I'd love to hear πŸ‘€

26 views

Add a comment

Replies

Best

Small activation bugs be surprisingly annoying because everything looks fine until the plugin actually runs. Was this one caught through testing or from a real project?

Β neither really... it turned up while I was reworking how migrations run for 3.0, which meant looking closely at what activation actually sees. on a real install the plugin's own name and version came back empty, and it had been like that since 1.8.0, almost two years. nobody reported it, since nothing visibly breaks: activation just saved its options under a row with no name πŸ˜…

which is your point exactly: the unit tests couldn't see it, since activation only happens inside a running WordPress and the suite doesn't boot one. so the fix was checked on a real install, not by the tests