Only add Craft events if the API key is set - #63
Open
jamie-s-white wants to merge 1 commit into
Open
Conversation
michtio
pushed a commit
that referenced
this pull request
Jul 14, 2026
Backlog closure sweep, the full docs pass, and the final static-analysis ramp. Quality (the contractual ZERO gate): - PHPStan level 6 -> 8 with the baseline kept empty; every source file passes L8. - ECS skip list emptied (Typesense.php, config.php, the synonyms migration cleaned to house standard); ECS clean across src and tests. - Deleted the dead Vue-era control-panel apparatus that was holding untyped, orphaned code: the src/web/assets Vue/TS sources and dist output, the TypesenseAsset and TypesenseUtilityAsset bundles, and the Vite plugin service wiring in PluginTrait/TypesenseVariable. Nothing rendered them after the Collections and Synonyms screens were retired. - Rewrote PluginTrait to house standard with typed, documented component getters. - Modernised the shipped src/config.php from the legacy shim shape to the fluent builder (null-safe transform). Regression tests (the three damning themes + one): - #68 CP action URLs are CP-based, never the site URL (unit, UrlHelper::actionUrl). - #63 saving before configuration is a safe no-op. - #67 applying a draft skips cleanly instead of fataling. - #65/#66 one element indexes into every collection whose query matches it. Docs: - Completed docs/ for the whole Free surface: multisite, drift, backup, and extension events for plugin authors. Rewrote the README for 5.9.0 (Free/Pro split, server floor v28 and refused 30.0/30.1, quick start). Backlog sweep recorded in smoke-testing/p7-issue-sweep.md (local, nothing posted): 7 issues and 8 PRs dispositioned, 6 pinned by tests. Search bug fixed along the way: Search now resolves the site-aware target so collectionPerSite front-end searches hit the right collection.
michtio
pushed a commit
that referenced
this pull request
Jul 16, 2026
Wrap the element event registration (and the delete event) so they only bind when an API key is configured, avoiding a save-time error on a fresh install before the plugin is set up. Adapted from the original PR to fit the current codebase: the API-key guard now wraps the cockpit-aware element filtering (Entry plus the cockpit element types) that postdates the PR, and keeps the null-entry guard on the restore/move re-query, rather than the PR's plain instanceof Entry check which would have regressed cockpit element support. Authored-by preserved from PR #63.
michtio
pushed a commit
that referenced
this pull request
Jul 16, 2026
Document the 5.8.4 round: the forward-compatibility namespace alias and the 5.9.0 namespace-move heads-up, the batched document sync rework (#70, resolves null entry (#67), .all-collection deletes (#64), events before configuration (#63), and the control-panel action URL / CRAFT_BASE_CP_URL confirmation (#68). Credits @timkelty, @jamie-s-white, @mikeymeister, and @vardumper.
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.
When we first install this plugin, if we try and save elements before we have fully configured the plugin, then the save event will error:
This PR avoids this scenario by checking that an API key has been set before it adds the Typesense events to elements.