Repository navigation
🐛 fix: activation reads the plugin header; migrate:create creates the table it is given - #120
Merged
Merged
Conversation
… table it is given Activation comes after init, which is where the kernel reads the plugin header since #51, so in Plugin::_activation() the slug was '' and Version null: the options delta wrote to an options row with no name, and plugin/activation.php saw no Version. It now reads the header first. Measured live on 2.1.0 (activation-live-smoke.sh): slug '', Version null, no options row of the plugin's own; all three right on this branch. The migrate:create stub ignored the table name and always created my_plugin_products. Both found while working on #40 for 3.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two 2.x bugs found while working on the 3.0 migrations (#40, #119), for 2.1.1.
init, and activation comes afterinit: inPlugin::_activation()the slug was''andVersionwas null, so the options delta wrote to an options row with no name, andplugin/activation.phpsaw noVersion. Every WP Bones plugin activated on 2.0.x/2.1.0 left that row behind (it is harmless, and this does not delete it).php bones migrate:create <table>creates<table>. The stub ignored the name and always wrotemy_plugin_products.Proof
composer test: 175 tests (one new, for the stub), green..claude/scripts/activation-live-smoke.shin the workspace, on WPKirk-Developing:''wp_kirk_developing_slug2.0.8(the bench's header)