feat: Namespace FriendsOfREDAXO/ActivityLog, Bugfixes & Dependency-Updates (v1.0.0-beta1) - #47
Merged
Merged
Conversation
…g_id (#46) - Neue Klassen unter FriendsOfREDAXO\ActivityLog\ und FriendsOfREDAXO\ActivityLog\EP\ - BC-Stubs für alle alten Klassen (rex_activity, RexActivity\EP\*) via extends - boot.php nutzt use-Statements statt globale FQN-Instantiierung - rex_cronjob_manager::registerType() nutzt ActivityLogCronjob::class - fix: Undefinierter Array-Key clang_id in Meta-EP fallback auf rex_clang::getCurrentId() - Alle EP-Callbacks nutzen static::class statt hardcoded String - Version 0.2.0
rex_article::get() und rex_category::get() dürfen beim delete-Typ nicht aufgerufen werden – das Objekt ist zu dem Zeitpunkt bereits aus der DB entfernt. Der interne SQL-Query kollidierte mit dem noch laufenden DELETE-Statement in service_article.php und warf eine rex_sql_exception (Unable to fetch row for statement). Lösung: Early-return bei type === 'delete', DB-Lookup vollständig überspringen.
This was referenced Mar 6, 2026
There was a problem hiding this comment.
Pull request overview
This PR modernizes the addon by migrating core functionality into the FriendsOfREDAXO\ActivityLog\* namespace (with backward-compatible stubs), applies targeted bugfixes in extension-point handlers, and updates PHP/Node tooling dependencies in preparation for v1.0.0-beta1.
Changes:
- Introduces new namespaced core classes (
Activity,ActivityClear,ActivityLogCronjob) and new EP handlers underFriendsOfREDAXO\ActivityLog\EP\*. - Replaces prior implementations with BC stubs (old class names now extend the new namespaced classes/traits).
- Updates dependency versions (Composer + npm) and adds
CHANGELOG.md.
Reviewed changes
Copilot reviewed 36 out of 38 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| package.yml | Bumps addon version and switches console command mapping to the new namespaced command class. |
| package.json | Updates Nightwatch/Geckodriver/Lodash dependency placement and versions for e2e tooling. |
| boot.php | Boots the new namespaced EP registry and registers the new cronjob type class. |
| lib/Activity.php | New namespaced Activity core (logging, callbacks, clearEntries). |
| lib/ActivityClear.php | New namespaced console command implementation. |
| lib/ActivityLogCronjob.php | New namespaced cronjob implementation. |
| lib/EP/ActivityExtensionPoints.php | New EP “registry” that instantiates all EP handlers (incl. optional YForm). |
| lib/EP/EpTrait.php | New shared trait for registering extension points and writing Activity logs. |
| lib/EP/Article.php | New EP handler for article events, including delete handling behavior change. |
| lib/EP/Category.php | New EP handler for category events, including delete handling behavior change. |
| lib/EP/Clang.php | New EP handler for language events. |
| lib/EP/Media.php | New EP handler for media events. |
| lib/EP/Meta.php | New EP handler for meta updates with clang fallback to address missing clang_id. |
| lib/EP/Module.php | New EP handler for module events. |
| lib/EP/Slice.php | New EP handler for slice events with safer clang fallback and more defensive lookups. |
| lib/EP/Template.php | New EP handler for template events. |
| lib/EP/User.php | New EP handler for user events. |
| lib/EP/Yform.php | New EP handler for YForm manager events (conditional activation). |
| lib/rex_activity.php | BC stub: rex_activity now extends the namespaced Activity. |
| lib/rex_activity_log_cronjob.php | BC stub: rex_activity_log_cronjob now extends the namespaced cronjob. |
| lib/console.php | BC stub: activity_clear now extends the namespaced console command. |
| lib/rex_activity_extension_points.php | BC stub: old EP registry now extends the new EP registry. |
| lib/extension_points/article.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/category.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/clang.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/ep_trait.php | BC stub: old trait now composes the new namespaced trait. |
| lib/extension_points/media.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/meta.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/module.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/slice.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/template.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/user.php | BC stub: old EP handler class now extends the new namespaced handler. |
| lib/extension_points/yform.php | BC stub: old EP handler class now extends the new namespaced handler. |
| composer.json | Updates PHPUnit constraint to the newer 9.6.x line. |
| composer.lock | Locks updated dev dependencies consistent with the PHPUnit bump. |
| CHANGELOG.md | Adds release notes for 1.0.0-beta1 documenting migration and fixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tenz (#17/#21) - DB: source VARCHAR(191) nullable in install.php + update.php - Activity::source() Methode + sourceListCallback - EpTrait: getSource() + source in logExtensionPoint() - Alle EP-Handler: getSource() gibt Quelle zurück (article/category/...) - Filter-Formular: Suche, Typ, Quelle, User als Bootstrap-3-Row, Selectpicker - Filter-Persistenz: list->addParam() für Pager, Hidden-Inputs in Lösch-Form - SCSS: Zeilenfarben nach Log-Level, Source-Badges mit eigenen Farben, Dark Mode - Sprachdateien: neue Keys für Spalten, Suche, Filter - README: source() dokumentiert - CHANGELOG aktualisiert
This was referenced Mar 6, 2026
… BC-Stub rex_activity
…t apply entfernt)
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.
Zusammenfassung
Dieses PR bringt die lang geplante Code-Modernisierung auf Basis der offenen Issues sowie verschiedene Bugfixes und aktualisierte Abhängigkeiten.
Änderungen
🏷️ Namespace-Migration (#38)
Alle Klassen wurden in den Namespace
FriendsOfREDAXO\ActivityLog\verschoben, wie es für FriendsOfREDAXO-Addons üblich ist:rex_activityFriendsOfREDAXO\ActivityLog\Activityrex_activity_log_cronjobFriendsOfREDAXO\ActivityLog\ActivityLogCronjobactivity_clearFriendsOfREDAXO\ActivityLog\ActivityClearRexActivity\EP\*FriendsOfREDAXO\ActivityLog\EP\*Abwärtskompatibilität: Alle alten Klassennamen bleiben als leere BC-Stubs erhalten (
class rex_activity extends Activity {}), bestehender Code funktioniert weiterhin.🐛 Fix:
clang_idUndefined array key (#46)In
EP\Metawurde$params['clang_id']ohne Existenzprüfung verwendet. Jetzt wirdrex_clang::getCurrentId()als sicherer Fallback genutzt.🐛 Fix:
rex_sql_exceptionbeim Löschen von Artikeln/KategorienBeim Auslösen von
ART_DELETED/CAT_DELETEDwurderex_article::get()/rex_category::get()aufgerufen, obwohl der Datensatz bereits gelöscht war – das kollidierte mit dem noch laufenden DELETE-Statement inservice_article.php. Die DB-Abfrage wird beim Typdeletenun vollständig übersprungen.✅ Keine Logs für Admins (#31)
Die bereits implementierte Option
disable_for_adminsist jetzt offiziell Teil der neuenActivity-Klasse und sauber dokumentiert.📦 Dependency-Updates (ersetzt PRs #41–#45)
phpunit/phpunit9.6.21 → 9.6.34 (CVE-2026-24765)nightwatch3.6.2 → 3.15.0lodash4.17.21 → 4.17.23geckodriver3.0.2 → 6.1.0Closes / References
Closes #38, Closes #46, References #31
Checklist
FriendsOfREDAXO\ActivityLog\use-Statements inboot.phppackage.ymlauf v1.0.0-beta1CHANGELOG.mdhinzugefügt