Add GitHub Updater support and fix fatal error in event tracking#1
Open
zackkatz wants to merge 4 commits intocode-atlantic:masterfrom
Open
Add GitHub Updater support and fix fatal error in event tracking#1zackkatz wants to merge 4 commits intocode-atlantic:masterfrom
zackkatz wants to merge 4 commits intocode-atlantic:masterfrom
Conversation
Add `GitHub Plugin URI` and `Primary Branch` headers to enable automatic plugin updates via the Git Updater plugin. Also fill in missing plugin metadata (Description, Version, License, Requires PHP, Requires at least) and correct the Plugin URI to point to the current repository.
The classmap autoload entry references the vendor-prefixed directory, but the directory wasn't tracked in git, causing composer to fail with "Could not scan for classes inside vendor-prefixed". Track the directory via .gitkeep so it exists on fresh clones.
…e methods The register() method hooked camelCase method names (e.g., addEventTrackingFilterOptions) but the actual methods use snake_case (e.g., add_event_tracking_filter_options). This caused a fatal TypeError on every page load where FluentCRM triggers these filters.
Security fixes: - Add authentication to REST endpoint (require manage_options capability) - Add date parameter validation to prevent malformed input - Sanitize $prop_name in SQL queries to prevent SQL injection - Use bound parameters for all whereRaw LIKE queries - Sanitize $_GET params before forwarding in SmartLink redirects Bug fixes: - Remove stray break in not_contains filter that skipped remaining filters - Fix wrong variable check ($item_value → $trimmed_values) in UpdateContactPropertyAction::formatCustomFieldValues - Fix trailing ?/& appended to redirect URLs when no query params exist - Remove empty switch statement (dead code from incomplete implementation) Cleanup: - Remove hardcoded debug email (daniel@code-atlantic.com) from event tracking - Remove no-op gettingAction() override in RandomWaitTimeAction - Remove dead code: commented-out hook, unused add_custom_dashboard_metrics(), placeholder register_custom_report/render_custom_report (Subscriber::all() memory bomb) - Remove Carbon dependency from REST endpoint (unnecessary) - Prefix remaining global functions with customcrm_ to avoid collisions
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.
Summary
GitHub Updater support
GitHub Plugin URIandPrimary Branchheaders to enable automatic plugin updates via Git UpdaterComposer fix
vendor-prefixed/.gitkeepto fix composer classmap scan error on fresh clonesFatal error fix
JSONEventTrackingHandler::register()where all hook callbacks referenced non-existent camelCase methods instead of the actual snake_case methodsSecurity fixes
/fluent-crm/v1/list-growthREST endpoint (requiremanage_optionscapability)$prop_namein JSON_EXTRACT SQL queries to prevent SQL injectionwhereRawLIKE queries (was using string interpolation)$_GETparams before forwarding in SmartLink redirectsBug fixes
breakinnot_containsfilter handler that silently skipped all remaining filters$item_value→$trimmed_values) inUpdateContactPropertyAction::formatCustomFieldValues?or&appended to redirect URLs when no query params existswitchstatement (dead code from incomplete implementation)Cleanup
daniel@code-atlantic.com) from event trackinggettingAction()override inRandomWaitTimeActionadd_custom_dashboard_metrics(), placeholderregister_custom_report/render_custom_report(Subscriber::all()memory issue)customcrm_to avoid namespace collisionsTest plan
?/&/fluent-crm/v1/list-growthendpoint returns 401 for unauthenticated requestscomposer installon a fresh clone and confirm no classmap scan error